From owner-freebsd-hackers Sat Nov 1 10:28:52 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA00723 for hackers-outgoing; Sat, 1 Nov 1997 10:28:52 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from heron.doc.ic.ac.uk (wNVPHrQHPsFC7rzqQyy2F+dfENNOjuWl@heron.doc.ic.ac.uk [146.169.2.31]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id KAA00718 for ; Sat, 1 Nov 1997 10:28:49 -0800 (PST) (envelope-from njs3@doc.ic.ac.uk) Received: from oak67.doc.ic.ac.uk [146.169.33.67] ([sg08ltvdpmRF8uaXOA1UdnIovPX2oFXy]) by heron.doc.ic.ac.uk with smtp (Exim 1.62 #3) id 0xRiI7-0000Nm-00; Sat, 1 Nov 1997 18:28:59 +0000 Received: from njs3 by oak67.doc.ic.ac.uk with local (Exim 1.62 #3) id 0xRiHi-0004IG-00; Sat, 1 Nov 1997 18:28:34 +0000 From: njs3@doc.ic.ac.uk (Niall Smart) Date: Sat, 1 Nov 1997 18:28:34 +0000 In-Reply-To: Brandon Gillespie "Re: Suggested addition to /etc/security" (Nov 1, 11:11am) X-Mailer: Mail User's Shell (7.2.5 10/14/92) To: Brandon Gillespie , Niall Smart Subject: Re: Suggested addition to /etc/security Cc: freebsd-hackers@freebsd.org Message-Id: Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Nov 1, 11:11am, Brandon Gillespie wrote: > > > > > find / -nouser -nogroup > > > > Shouldn't this be "find / -nouser -o -nogroup -print"? > > > Yeah, or even better: > > > > > > files=`find / -nouser -o -nogroup -print` > > > ls -ldF $files > > > > > > (this looks better than find / -nouser -o -nogroup -exec ls -ldF {} \;) > > > > Looks better? They should produce identical output. "find / -nouser -o > > -nogroup -print | xargs -n 30" is more efficient btw :)) however > > using -exec with find is othe only one that works with filenames with > > embedded spaces. > > No, it does not look the same. 'ls' will columnize the output to fit > every file its listing--but it will vary the column widths for each > execution. Ahh yes, I had not run it over enough files to see more than one execution of ls. Of course, you could pipe it through awk to format the columns if presentation and speed of execution were important :) Given that the number of files without a group or user is probably going to be small the original way which you suggested, with the addition of the '-o' argument to find seems best now. Niall