Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!midway!clout!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.questions Subject: Re: Do you use find command? Message-ID: <1991May17.163938.26492@chinet.chi.il.us> Date: 17 May 91 16:39:38 GMT References: <2570005@hpcc01.HP.COM> Organization: Chinet - Chicago Public Access UNIX Lines: 26 In article <2570005@hpcc01.HP.COM> maryhc@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@chinet.chi.il.us