find command
Donald Lashomb
donlash at uncle.UUCP
Thu Nov 30 14:29:53 AEST 1989
In article <21544 at adm.BRL.MIL> mchinni at pica.army.mil (Michael J. Chinni, SMCAR-CCS-E) writes:
>I was reading an article in a magazine, and the article was talking about the
>find command. It mentioned as an example: find / -depth -print
>
>Now I have RTFM (both on BSD-based systems and SysV-based system) and I can find
>no option -depth, furthermore, when I try the example I get:
>find: bad option < -depth >
>
>What does this option mean ?
Gee, it's in my manual ( AT&T unix-pc ):
-depth Always true. Must begin the expression. Forces a*depth-first
search: find does not apply the expression to a directory
until it has applied the expression to all the files in the
directory. This is useful with cpio; see example in cpio(1).
If the example were done without -depth, the modification
dates on the copied directories would not match their
originals.
The example from cpio(1) manual page:
find . -depth -print | cpio -pdl newdir
Hope this helps,
Don
More information about the Comp.unix.questions
mailing list