From owner-freebsd-current@FreeBSD.ORG Wed Apr 21 13:24:17 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7E9B16A4CE for ; Wed, 21 Apr 2004 13:24:17 -0700 (PDT) Received: from smtp0.server.rpi.edu (smtp0.server.rpi.edu [128.113.53.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 704B043D58 for ; Wed, 21 Apr 2004 13:24:17 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp0.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i3LKOGEd019345; Wed, 21 Apr 2004 16:24:16 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <4086D513.9010605@centtech.com> References: <40867A5D.9010600@centtech.com> <4086D513.9010605@centtech.com> Date: Wed, 21 Apr 2004 16:24:15 -0400 To: Eric Anderson From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) cc: freebsd-current@freebsd.org Subject: Re: Directories with 2million files X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2004 20:24:17 -0000 At 3:09 PM -0500 4/21/04, Eric Anderson wrote: >Garance A Drosihn wrote: > >>... If you really do want the -l (lowercase L) >>instead of -1 (digit one), it *might* help to add the -h option. > >Used 263MB, before returning the correct number.. It's functional, >but only if you have a lot of ram. Darn. Well, that was a bit of a long-shot, but worth a try. >>Another option is to use the `stat' command instead of `ls'. >>One advantage is that you'd have much better control over >>what information is printed. > >I'm not sure how to use stat to get that same info. Oops. My fault. I thought the `stat' command had an option to list all files in a given directory. I guess you'd have to combine it with `find' to do that. >>>du does the exact same thing. >> >>Just a plain `du'? If all you want is the total, did you >>try `du -s'? I would not expect any problem from `du -s'. > >$ du -s >du: fts_read: Cannot allocate memory Huh. Well, that seems pretty broken... >>>I'd work on some patches, but I'm not worth much when it comes >>>to C/C++. If someone has some patches, or code to try, let me >>>know - I'd be more than willing to test, possibly even give out >>>an account on the machine. >> >> >>It is probably possible to make `ls' behave better in this >>situation, though I don't know how much of a special-case >>we would need to make it. > > >I suppose this is one of those "who needs files bigger than 2gb?" >things.. Perhaps, but as a general rule we'd like our system utilities to at least *work* in extreme situations. This is something I'd love to dig into if I had the time, but I'm not sure I have the time right now. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu