From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <64836771fc63328bf50220409c7b3b45@brasstown.quanstro.net> References: < <64836771fc63328bf50220409c7b3b45@brasstown.quanstro.net> Date: Sat, 2 Jan 2010 18:43:29 +0000 Message-ID: From: roger peppe To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] du and find Topicbox-Message-UUID: b5e40b54-ead5-11e9-9d60-3106f5b1d025 2010/1/2 erik quanstrom : >> and /sys/src isn't by any means the largest tree i like to grep >> (for instance, searching for lost files with a name i longer remember, >> i've been known to search through all the files in my home directory, >> ~425000 files at last count) >> >> sometimes i think it would be nice if du had a breadth-first option. > > aren't you contridicting yourself? =C2=A0at 128 characters/file, > that's only 52mb -- 2% of memory on a typical system these days. > why can't it be passed as an argument list? i'm not saying it can't be passed in an argument list, just that xargs gives you a lazy evaluation of the walk of the file tree which can result in a faster result when the result is found earlier in the file list. that's why breadth-first might be useful, by putting shallower files earlier in the search results - i often do grep foo *.[ch] */*.[ch] */*/*.[ch] to achieve a similar result, but you have to guess the depth that way.