Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!zaphod.mps.ohio-state.edu!uwm.edu!ux1.cso.uiuc.edu!phil From: phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) Newsgroups: comp.unix.questions Subject: Re: Do you use find command? Message-ID: <1991May19.061531.26730@ux1.cso.uiuc.edu> Date: 19 May 91 06:15:31 GMT References: <2570005@hpcc01.HP.COM> Organization: University of Illinois at Urbana Lines: 67 maryhc@hpcc01.HP.COM (Mary Hsia-Coron) writes: >Do you use the -print and -depth options with the find command? I use -print, but -depth does not work. >-print option: >-------------- >All the manual pages I've read recommend using -print to display >output from find. I've found that -print is unnecessary >on my HP-UX systems (7.0 HP-UX and later releases). For example, > find / -user pat >works fine. For me, it gives no output. If that's what I want, then it works fine. >Question: >--------- >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. Alternatively "-ls". Sequent DYNIX. >-depth option: >-------------- >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. I suppose it might be nice to have a way to specify NOT to do that. >Question: >--------- >On your UNIX system, must find be used with -depth when piping to cpio? >(Please state what flavor of UNIX you have: ULTRIX, SUN, ZENIX, etc.) I can pipe anything I want to anything I want. I've never used "cpio". When I use "tar" I usually want the whole tree and "tar" does that fine. >I'm documenting use of find on UNIX systems IN GENERAL and want to make the >right recommendations about whether to use -print and -depth. I was going >to recommend that both options not be used. I'm afraid you documentation would be implementation/vendor specific. But noting your address domain and job description from your signature, it sounds as though that might not be a problem. If you are writing this specifically for HP-UX users, then of course it is appropriate to deal with exactly how these things work in HP-UX. Perhaps you are writing it to be more generic, in which case you have a big chore ahead of you, since there are so many inconsistent flavors of everything out there. >Thanks for any info you can provide! >Mary Hsia-Coron >Hewlett-Packard Customer Training >mary@hpasdd.hp.com Welcome. -- /***************************************************************************\ / Phil Howard -- KA9WGN -- phil@ux1.cso.uiuc.edu | Guns don't aim guns at \ \ Lietuva laisva -- Brivu Latviju -- Eesti vabaks | people; CRIMINALS do!! / \***************************************************************************/