searching for a file
Jonathan I. Kamens
jik at athena.mit.edu
Mon May 8 15:45:24 AEST 1989
In article <1530 at cmx.npac.syr.edu> gefuchs at logiclab.cis.syr.edu (Gill
E. Fuchs) writes:
>i was thinking of using :
> find . -name 'gugu' -print
>but obviously that only works for the current directory
>how would one make that a recursive search, something a la ls -R
No, actually, this "obviously" will do a recursive search, which is
(apparently) what you want. From the man page for find(1):
SYNOPSIS
find pathname-list expression
find pattern
DESCRIPTION
In the first form above, find recursively descends the
directory hierarchy for each pathname in the pathname-list
(i.e., one or more pathnames) seeking files that match a
boolean expression written in the primaries given below.
And here's an example from actual usage:
% find . -name delete -print
./vax/delete
./vax/delete/delete
./Mail/delete
./rtbin/delete
./vaxbin/delete
./rt/delete
./rt/delete/delete
./src/delete
./NeXTbin/delete
./NeXT/delete
./NeXT/delete/delete
Jonathan Kamens USnail:
MIT Project Athena 410 Memorial Drive, No. 223F
jik at Athena.MIT.EDU Cambridge, MA 02139-4318
Office: 617-253-4261 Home: 617-225-8218
More information about the Comp.unix.questions
mailing list