Hi all,
My goal is to find all my 'man' dirs in my sw structure and from that create a windex db. I get many new software dirs every week soo I need to rebuild the windex db very often. I've started with this:
OS: Solaris 8
#!/bin/bash
find /sw/tools -type d -name 'man*' -print
... (3 Replies)
Hey guys,
I would like to find all files which contain "client1.dat". I would like to search from the current directory and all subs and print out all the files that have this. Any help would be greatly appreciated.
Thanks much. (10 Replies)
I have a directory which is /home/mark/files/ , inside this particular I have a bunch of filles (see examples below)
TST_SHU_00014460_20090302.txt
TST_SHU_00016047_20090302.txt
TST_SHU_00007838_20090303.txt
TST_SHU_00056485_20090303.txt
TST_SHU_00014460_20090303.txt... (2 Replies)
Hey all.. This should be simple but stoopid here can't get head around it! I have many directories, say 100 each with many files inside. I need a script to traverse through the dirs, find most recent file in each dir and add it to a tar file.
I can find the files with something like
for... (1 Reply)
I have lots of directories in ~/.
My diaries are stored in directories in ~/ containing exactly 4 digits.
How do I use the /usr/bin/find command to only search my diary directories?
So I would like my search to include ~/2009/abc/def and ~/2010/2001/33 but not ~/103/ or ~/20101/ or ~/201/... (2 Replies)
df -k | grep -v dcs |grep -v Filesystem| awk -F" " '{if(substr($5,0,length($5)-1)>87)print $5" " $6}' >> sms.txt
1) Is it the correct way to list all the filesystems > 90%
2) Is there any way to print hostname in this command ? The hostname should get printed in sms.txt file only when there... (9 Replies)
Hi Experts,
I want to find all the dirs , subdirs on the sever which start with "sr".
Can anyone let me know command for the same.
find . -type d -name sr* I tried this but it is not working.
Thanks,
Ajay (4 Replies)
Hi,
My first time on this site, please excuse me if I've come to the wrong forum. I'm fairly new to Unix/Linux and hoping you can help me out.
I'm looking for a command line that will return a list of directories that are larger than 50M and older than 2 days.
I thought it may be... (6 Replies)
Discussion started by: Wisconsingal
6 Replies
LEARN ABOUT DEBIAN
file::find::object::rule::procedural
File::Find::Object::Rule::Procedural(3pm) User Contributed Perl Documentation File::Find::Object::Rule::Procedural(3pm)NAME
File::Find::Object::Rule::Procedural - File::Find::Object::Rule's procedural interface
SYNOPSIS
use File::Find::Object::Rule;
# find all .pm files, procedurally
my @files = find(file => name => '*.pm', in => @INC);
DESCRIPTION
In addition to the regular object-oriented interface, File::Find::Object::Rule provides two subroutines for you to use.
"find( @clauses )"
"rule( @clauses )"
"find" and "rule" can be used to invoke any methods available to the OO version. "rule" is a synonym for "find"
Passing more than one value to a clause is done with an anonymous array:
my $finder = find( name => [ '*.mp3', '*.ogg' ] );
"find" and "rule" both return a File::Find::Object::Rule instance, unless one of the arguments is "in", in which case it returns a list of
things that match the rule.
my @files = find( name => [ '*.mp3', '*.ogg' ], in => $ENV{HOME} );
Please note that "in" will be the last clause evaluated, and so this code will search for mp3s regardless of size.
my @files = find( name => '*.mp3', in => $ENV{HOME}, size => '<2k' );
^
|
Clause processing stopped here ------/
It is also possible to invert a single rule by prefixing it with "!" like so:
# large files that aren't videos
my @files = find( file =>
'!name' => [ '*.avi', '*.mov' ],
size => '>20M',
in => $ENV{HOME} );
AUTHOR
Richard Clamp <richardc@unixbeard.net>
COPYRIGHT
Copyright (C) 2003 Richard Clamp. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
File::Find::Object::Rule
perl v5.14.2 2012-05-05 File::Find::Object::Rule::Procedural(3pm)