Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Nov 1997 18:28:34 +0000
From:      njs3@doc.ic.ac.uk (Niall Smart)
To:        Brandon Gillespie <brandon@roguetrader.com>, Niall Smart <njs3@doc.ic.ac.uk>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Suggested addition to /etc/security
Message-ID:  <E0xRiHi-0004IG-00@oak67.doc.ic.ac.uk>
In-Reply-To: Brandon Gillespie <brandon@roguetrader.com> "Re: Suggested addition to /etc/security" (Nov  1, 11:11am)

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E0xRiHi-0004IG-00>