From owner-freebsd-hackers Sat Nov 1 10:11:39 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA29731 for hackers-outgoing; Sat, 1 Nov 1997 10:11:39 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from roguetrader.com (brandon@cold.org [206.81.134.103]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA29726 for ; Sat, 1 Nov 1997 10:11:37 -0800 (PST) (envelope-from brandon@roguetrader.com) Received: from localhost (brandon@localhost) by roguetrader.com (8.8.5/8.8.5) with SMTP id LAA12146; Sat, 1 Nov 1997 11:11:38 -0700 (MST) Date: Sat, 1 Nov 1997 11:11:37 -0700 (MST) From: Brandon Gillespie To: Niall Smart cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Suggested addition to /etc/security In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sat, 1 Nov 1997, Niall Smart wrote: > On Nov 1, 10:58am, 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. Thus, calling 'ls' on all files at once looks better than calling it seperately for each file involved. Yeah, its completely cosmetic, but its also easier to read. xargs is also undesired because it would still do the same as -exec, that being calling ls seperately for each file... Compare: crw-rw---- 1 uucp 68 28, 195 Jul 23 20:24 /dev/cuala3 crw------- 1 uucp 68 52, 0 Jul 23 20:24 /dev/tun0 -r-sr-sr-x 1 uucp 68 110592 May 20 04:31 /usr/bin/cu* -r-sr-sr-x 1 uucp 68 86016 May 20 04:31 /usr/bin/uustat* -r-sr-sr-x 1 uucp 68 196608 May 20 04:31 /usr/libexec/uucp/uucico* drwxrwxr-x 2 bin 6 512 Oct 31 10:27 /var/mail/ drwxrwxr-x 2 uucp 68 512 May 20 04:28 /var/spool/lock/ vs: crw-rw---- 1 uucp 68 28, 195 Jul 23 20:24 /dev/cuala3 crw------- 1 uucp 68 52, 0 Jul 23 20:24 /dev/tun0 -r-sr-sr-x 1 uucp 68 110592 May 20 04:31 /usr/bin/cu* -r-sr-sr-x 1 uucp 68 86016 May 20 04:31 /usr/bin/uustat* -r-sr-sr-x 1 uucp 68 196608 May 20 04:31 /usr/libexec/uucp/uucico* drwxrwxr-x 2 bin 6 512 Oct 31 10:27 /var/mail/ drwxrwxr-x 2 uucp 68 512 May 20 04:28 /var/spool/lock/ The first is listing all files at once, where the latter is listing them seperately. The data is the same, but what is easier to read? -Brandon Gillespie