Wildcard-specs
lacasse at RAND-UNIX.arpa
lacasse at RAND-UNIX.arpa
Fri Sep 26 17:32:37 AEST 1986
To grep all files in the directories immediately below you, use
grep strings */*
For another level, use:
grep strings */*/*
If you run over N characters (about 8K on 4.2BSD I think) in the expansion
of the total file name list, you will have to break it up. (You get the
message "argument list too long".) The ** symbolics uses won't do it.
Some commands (e.g. rm, chgrp, chown, chmod[4.3 only] ) have a -r flag
that does a recursive descent.
If you have all day, you can use:
find . -exec grep string {} \;
which will do a recursive descent from where you are, but starts a lot
of new processes along the way.
Mark LaCasse qantel!hplabs!sdcrdcf!randvax!lacasse
c/o The Rand Corporation cbosgd!ihnp4!sdcrdcf!randvax!lacasse
1700 Main Street lacasse at Rand-Unix
Santa Monica, CA 90406
213/393-0411 ext. 7420
More information about the Comp.unix
mailing list