×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




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
different
job.

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. :)

D

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"Tact is the ability to describe others as they see themselves."
-- Abraham Lincoln



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2026 by midrange.com 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.