To case-insensitively search under /repo for filenames matching *UAP* that are owned by john while not descending into any portion of the hiearchy under a .step directory:
The logic depends on the fact that a filename exactly matching .step cannot possibly match *UAP*. If this were not the case, another type -f could be added after -prune.
Hi ,
I want to backup the root file system but the size of / is very huge so I want to exclude some file systems.Man page of tar says X option excludes files but I could not do that.I use this command
$ tar -cvf deneme.tar -X exc .
$ cat exc
sql
kkm
I think there... (2 Replies)
Hi guys, i'm new to UNIX and only know a small amout about it, but have just had some changes at work which now require me to interact with and work on SUN Unix systems often. I have reasonable knowledge of PC's but hope that you will be able to help me with these questions.
Part1.
I would like... (3 Replies)
Hi,
I had a directory and many subdirectories and files with in it.
Now i want to get the timestamp of files from the files and folders recursively. :(
Please help me to generate a script fort he above mentioned requirement!
Appreciate for ur qick response
Thanks in advance!
... (2 Replies)
Is there a way to find a specifc folder or filename in an RPM archive? I have dozens to go through and the hunt-and-peck method is too slow. (3 Replies)
I need to delete a folder and files in it of yesterdays and simply put this in cron.
Folder name - "2010-03-2010"
File name - "eprod_06_23.dmp" and "eprod_06_23.exp"
Actually this folder and file is been created by a script which takes a backup of DB everyday.Thats why it creates folder and file... (3 Replies)
Hi
I want to copy the structure from one place to another.
-> cd /hol/;
-> find . -type d | cpio -pvdm /abc/cat;
while copying the structure I want to exclude some directories like test1 and Test.
I have read somewhere that this can be done with -prune option.
Could anyone... (2 Replies)
Hi Unix Gurus,
I am able to copy only files that exist in the parent folder. My parent folder has sub folders and within sub folders there are lots files.
I need to copy folder, sub folders and files from Unix to the remote windows SFTP location.
The directory structure is something like... (1 Reply)
hi,
I need to find files that have been created less than 3 days ago. However, I need to only search specific directories.
I've searched about the net and found some useful commands such as :
find . -type d -name 'dir_to_exclude' -prune -o -print -mtime -3
however I cannot get it... (2 Replies)
I have a main folder.
Inside that i have many(50) subfolders.
In each subfolder, there are a no of large files(500 files ) present.
I want to do copy operation for some files from some of the subfolders to /usr/tmp.
I have the list of the subfolders and list of of files which i dont want to... (4 Replies)
I have unix file like below
>newuser
newuser
<hello
hello
newone
I want to find the unique values in the file(excluding <,>),so that the out put should be
>newuser
<hello
newone
can any body tell me what is command to get this new file. (7 Replies)
Discussion started by: shiva2985
7 Replies
LEARN ABOUT DEBIAN
config::model::treesearcher
Config::Model::TreeSearcher(3pm) User Contributed Perl Documentation Config::Model::TreeSearcher(3pm)NAME
Config::Model::TreeSearcher - Search tree for match in value, description...
VERSION
version 2.021
SYNOPSIS
use Config::Model ;
use Log::Log4perl qw(:easy) ;
Log::Log4perl->easy_init($WARN);
# define configuration tree object
my $model = Config::Model->new ;
$model ->create_config_class (
name => "MyClass",
element => [
[qw/foo bar/] => {
type => 'leaf',
value_type => 'string'
},
baz => {
type => 'hash',
index_type => 'string' ,
cargo => {
type => 'leaf',
value_type => 'string',
},
},
],
) ;
my $inst = $model->instance(root_class_name => 'MyClass' );
my $root = $inst->config_root ;
my $step = 'baz:fr=bonjour baz:hr="dobar dan" foo="journalled"';
$root->load( step => $step ) ;
my @result = $root->tree_searcher(type => 'value')->search('jour');
print join("
",@result),"
" ;
# print
# baz:fr
# foo
DESCRIPTION
This class provides a way to search the content of a configuration tree. Given a keyword or a pattern, the search method will scan the
tree to find a value, a description or anything that match the given pattern (or keyword).
Constructor
new (type => [ value | description ... ] )
Creates a new searcher object. The "type" parameter can be:
element
value
key
summary
description
help
all Search in all the items above
Methods
search(keyword)
Search the keyword or pattern in the tree. The search is done in a case insensitive manner. Returns a list of path pointing to the matching
tree element. See "grab(...)" in Config::Model::AnyThing for details on the path syntax.
BUGS
Creating a class with just one search method may be overkill. OTOH, it may be extended later to provide iterative search.
AUTHOR
Dominique Dumont, (ddumont at cpan dot org)
SEE ALSO
Config::Model, Config::Model::SearchElement, Config::Model::AnyThing
perl v5.14.2 2012-11-09 Config::Model::TreeSearcher(3pm)