Date: Fri, 30 Jul 2010 10:40:04 +0200 (CEST) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-bugs@FreeBSD.ORG, brde@optusnet.com.au, jilles@FreeBSD.ORG, andyf@speednet.com.au Subject: Re: bin/54784: find(1) -ls wastes space Message-ID: <201007300840.o6U8e4AD008230@lurza.secnetix.de> In-Reply-To: <20100730144702.M2522@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote: > On Thu, 29 Jul 2010 jilles@FreeBSD.org wrote: > > > Synopsis: find(1) -ls wastes space > > > > State-Changed-From-To: open->closed > > State-Changed-By: jilles > > State-Changed-When: Thu Jul 29 23:24:55 UTC 2010 > > State-Changed-Why: > > I don't think there is a good way to fix this. > > Iterating over all users with getpwent() may be very slow or may not work > > at all in some environments. > > I don't see another way to find the column widths. Buffering all output > > would be rather annoying as well. > > It certainly gives unreadable output. And didn't someone want to bloat > UT_NAMESIZE to 256 or so, so that only users with 400-column terminals > could read the output? I'm afraid I have to agree with Jilles here. I don't think many people actually read the output from find -ls. Personally I only use find -ls in scripts, although recently I'm tempted to use "find ... | xargs stat" instead because stat(1) provides much more flexibility regarding the output format, so the script doesn't have to do as much parsing itself. On the other hand, find -ls exists for MUCH longer and is more portable. If I actually want to read ls-like output on the screen, I use "find | xargs ls -...". I also *strongly* agree with Jilles that find(1) should not buffer all output. This could possibly break some scripts or at least make them run slower and less efficient. > I didn't know that find -ls existed, and would use xargs :-). I did know that it exists, and I do use xargs. :-) (Well, at least for output that's supposed to be read by humans. Scripts are a different story.) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "I have stopped reading Stephen King novels. Now I just read C code instead." -- Richard A. O'Keefe
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007300840.o6U8e4AD008230>