From owner-freebsd-bugs@FreeBSD.ORG Fri Jul 30 08:40:23 2010 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91C2D1065672; Fri, 30 Jul 2010 08:40:23 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id D19FD8FC14; Fri, 30 Jul 2010 08:40:22 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o6U8e4s8008231; Fri, 30 Jul 2010 10:40:20 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o6U8e4AD008230; Fri, 30 Jul 2010 10:40:04 +0200 (CEST) (envelope-from olli) Date: Fri, 30 Jul 2010 10:40:04 +0200 (CEST) Message-Id: <201007300840.o6U8e4AD008230@lurza.secnetix.de> From: Oliver Fromme To: freebsd-bugs@FreeBSD.ORG, brde@optusnet.com.au, jilles@FreeBSD.ORG, andyf@speednet.com.au In-Reply-To: <20100730144702.M2522@delplex.bde.org> X-Newsgroups: list.freebsd-bugs User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.4 (lurza.secnetix.de [127.0.0.1]); Fri, 30 Jul 2010 10:40:20 +0200 (CEST) Cc: Subject: Re: bin/54784: find(1) -ls wastes space X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 08:40:23 -0000 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