Do you use find command?

Leslie Mikesell les at chinet.chi.il.us
Sat May 18 02:39:38 AEST 1991


In article <2570005 at hpcc01.HP.COM> maryhc at hpcc01.HP.COM (Mary Hsia-Coron) writes:
>On your UNIX system, must -print be used to display the results of
>find? (Please state what flavor of UNIX you have: ULTRIX, SUN, ZENIX, etc.)
Yes, for AT&T SysVr3.

>The AT&T System V manual pages say that when find is used with cpio,
>-depth should be used to list files in directories without write
>permission. For example:
>       find / -name report -depth | cpio -ov > /dev/rmt/0h

>On HP-UX systems, find will list files in directories without write
>permission even when -depth is NOT used.

The significant difference is that -depth makes the directory appear
later in the list than its contents.  When cpio sees a directory name
in its input, it stores and entry for that directory in the archive
containing its owner, modes, and similar info.  When restoring files,
it restores the same owner and modes.  However, with the -d option,
it will create any needed directories (with default modes) so you
can write the files there.  If the read-only directory entry comes
later than the files, the read-only mode mode isn't set until the
files are already in place.  If it comes first, you won't be able to
write the files.

Les Mikesell
  les at chinet.chi.il.us



More information about the Comp.unix.questions mailing list