04-23-2008
Find /Dir
Here is the problem i now have.
i have a list of directories like this
W9888
W9848
W9752
W9748
W9683
W9680
W9674
W9558
W9366
i need to scan through those directories and bring back a similar list, except only of the directories not containing subdirectories called "ebooks" or "e*" I had some help with this earlier and resolved all other issues i was having except for this one.
the list i get back could really only be one line less, but i am doing this over thousands of files.
here is what i have tried so far but it does not work.
find ./$line -maxdepth 1 -type d \! -name "e*" > noebook.txt
i'm running leopard
10 More Discussions You Might Find Interesting
1. Programming
Hi,
I want to find whether a dir "temp" is present inside a dir. It should get a dir a input and search recursively within that directory to check whether temp is present and return 1 or return 0 if it is not present anywhere inside the directory/sub-directory. I know we can use readdir in the... (1 Reply)
Discussion started by: spsenthil
1 Replies
2. Shell Programming and Scripting
hi everybody,
i have dir structure like this,
.
./processed
./results
./archive
./archive/processed
./archive/results
./archive/logs
./archive/decisions
./archive/error
./logs
./inbox
./decisions
./progress
./outbox
./config
./error (12 Replies)
Discussion started by: manas_ranjan
12 Replies
3. UNIX for Dummies Questions & Answers
HI All,
I have recuirement to purge the files in a directory . In that directory i an having many sub-directory .
When i use find command like
find ~/work/test/insert -name "*.*" -mtime +12
it is listing the file not accesed before 12 , It also takes the subdirectories inside the... (7 Replies)
Discussion started by: arunkumar_mca
7 Replies
4. UNIX for Dummies Questions & Answers
hello all,
I want to ask, how to find last week directory and then remove it..
I have a directory in path /home/backup/
and, inside backup dir, I have 6 dir :
- 01_20080414 ( today date )
- 02_20080414 ( today date )
- 01_20080413
- 02_20080413
- 01_20080407 ( last week date )
-... (1 Reply)
Discussion started by: kunimi
1 Replies
5. UNIX for Dummies Questions & Answers
Hello everyone, I'm a newbie.
I've got a problem while using find.
I know there is a way to do it in man find which is something like
find . -wholename './src/emacs' -prune -o -print
it works but i also want to use -daystart, -mtime, -type on it and i dont know whats the sequence of these... (0 Replies)
Discussion started by: aquaraider
0 Replies
6. Shell Programming and Scripting
Hello!!
I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory:
drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies
7. Shell Programming and Scripting
Hello experts,
Can someone please help me handling the below situation.
I have files in multiple directories as below.
/data/input/A.txt
/data/input/a1.txt
/data/input/adhoc/b.txt
/data/input/adhoc/b1.txt
/data/input/adhoc/temp/c.txt
/data/input/adhoc/temp/d.txt
where some of... (3 Replies)
Discussion started by: pasupuleti81
3 Replies
8. Shell Programming and Scripting
I want to find a dir called STOP from the root.so what is the find command.
Thanks & Regards
Rajkumar (1 Reply)
Discussion started by: rajkumar_g
1 Replies
9. Shell Programming and Scripting
Dear Members,
I have a list of xml files like
abc.xml.table
prq.xml.table
...
..
.
in a txt file.
Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file.
Please help me with the script or command to do so.
... (11 Replies)
Discussion started by: Yoodit
11 Replies
10. Shell Programming and Scripting
Hi,
From below directories path I need the directory which comes immediately after the "DataPath"
/var/errors/LogDefaultPath/DataPath/Data01/Data02 (Directory name "Data01" is the result from this path)
/var/errors/LogDefaultPath/DataPath/Log01/Log0202 (Directory name "Log01" is the... (4 Replies)
Discussion started by: Yuvaan12
4 Replies
LEARN ABOUT REDHAT
extutils::installed
ExtUtils::Installed(3pm) Perl Programmers Reference Guide ExtUtils::Installed(3pm)
NAME
ExtUtils::Installed - Inventory management of installed modules
SYNOPSIS
use ExtUtils::Installed;
my ($inst) = ExtUtils::Installed->new();
my (@modules) = $inst->modules();
my (@missing) = $inst->validate("DBI");
my $all_files = $inst->files("DBI");
my $files_below_usr_local = $inst->files("DBI", "all", "/usr/local");
my $all_dirs = $inst->directories("DBI");
my $dirs_below_usr_local = $inst->directory_tree("DBI", "prog");
my $packlist = $inst->packlist("DBI");
DESCRIPTION
ExtUtils::Installed provides a standard way to find out what core and module files have been installed. It uses the information stored in
.packlist files created during installation to provide this information. In addition it provides facilities to classify the installed
files and to extract directory information from the .packlist files.
USAGE
The new() function searches for all the installed .packlists on the system, and stores their contents. The .packlists can be queried with
the functions described below.
FUNCTIONS
new()
This takes no parameters, and searches for all the installed .packlists on the system. The packlists are read using the ExtU-
tils::packlist module.
modules()
This returns a list of the names of all the installed modules. The perl 'core' is given the special name 'Perl'.
files()
This takes one mandatory parameter, the name of a module. It returns a list of all the filenames from the package. To obtain a list
of core perl files, use the module name 'Perl'. Additional parameters are allowed. The first is one of the strings "prog", "doc" or
"all", to select either just program files, just manual files or all files. The remaining parameters are a list of directories. The
filenames returned will be restricted to those under the specified directories.
directories()
This takes one mandatory parameter, the name of a module. It returns a list of all the directories from the package. Additional
parameters are allowed. The first is one of the strings "prog", "doc" or "all", to select either just program directories, just manual
directories or all directories. The remaining parameters are a list of directories. The directories returned will be restricted to
those under the specified directories. This method returns only the leaf directories that contain files from the specified module.
directory_tree()
This is identical in operation to directories(), except that it includes all the intermediate directories back up to the specified
directories.
validate()
This takes one mandatory parameter, the name of a module. It checks that all the files listed in the modules .packlist actually exist,
and returns a list of any missing files. If an optional second argument which evaluates to true is given any missing files will be
removed from the .packlist
packlist()
This returns the ExtUtils::Packlist object for the specified module.
version()
This returns the version number for the specified module.
EXAMPLE
See the example in ExtUtils::Packlist.
AUTHOR
Alan Burlison <Alan.Burlison@uk.sun.com>
perl v5.8.0 2002-06-01 ExtUtils::Installed(3pm)