Only 10 minutes and you quit? Do remember that these sort of commands
can run for a LONG time especially if you have a lot of directories!
Watch active jobs and you'll see the find command running in a

It didn't occur to me until after a good night's sleep that on iSeries when
searching from / the search includes all the members of all the files of all
the libraries (in the /QSYS.LIB filesystem), the /QDLS, /QOpenSys and
possibly other filesystems that don't presently come to mind. Of course
that will run for "a while." To tell find to search only the present
filesystem, use the -x switch, as in:
find -x / -type d | grep i- '/mydir/mysubdir$'

Yes, that will run for a considerable time too (as Larry pointed out) but at
least it won't spend any time futilely searching, especially in /QSYS.LIB.

You are far better off to limit find to a subset of directories (such as
find /home /mytop /otherdir /source -type d | grep -i 'whatISeek'), and then
opening up the search to a grander scale only if necessary.

Final thought is that with experience comes the intuition necessary to
efficiently use these commands (like with most other things). It's like
cooking chicken: fricassee, fricassee, fry fry again. :)


Dennis Lovelady
"Tact is the ability to describe others as they see themselves."
-- Abraham Lincoln

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].