Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.questions Subject: Re: searching for a file Message-ID: <11212@bloom-beacon.MIT.EDU> Date: 8 May 89 05:45:24 GMT References: <1530@cmx.npac.syr.edu> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Organization: Massachusetts Institute of Technology Lines: 39 In article <1530@cmx.npac.syr.edu> gefuchs@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@Athena.MIT.EDU Cambridge, MA 02139-4318 Office: 617-253-4261 Home: 617-225-8218