From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <20091228230510.GA25423@machine> Date: Tue, 29 Dec 2009 11:28:45 -0700 Message-ID: <68eb39920912291028p30382a5cpe6b9a533ffba2fb6@mail.gmail.com> From: Don Bailey To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=0016e6dab0fd3b0790047be23131 Subject: Re: [9fans] du and find Topicbox-Message-UUID: b38ff890-ead5-11e9-9d60-3106f5b1d025 --0016e6dab0fd3b0790047be23131 Content-Type: text/plain; charset=ISO-8859-1 Chicken dinner! On Tue, Dec 29, 2009 at 10:59 AM, Tim Newsham wrote: > It is suggested to use >> du -a | awk '{print $2}' >> instead of find. But what if filename contains spaces? For example if >> file is named "foo bar" then awk will output "foo" only. >> > > What about > > du -a | sed 's/^[0-9]*//g' > > no loss on spaces in filenames. > no loss on tabs in filenames. > > Tim Newsham | www.thenewsh.com/~newsham| > thenewsh.blogspot.com > > --0016e6dab0fd3b0790047be23131 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Chicken dinner!

On Tue, Dec 29, 2009 at 1= 0:59 AM, Tim Newsham <newsham@lava.net> wrote:
It is suggested to use
=A0 du -a | awk '{print $2}'
instead of find. But what if filename contains spaces? For example if
file is named "foo bar" then awk will output "foo" only= .

What about

=A0 du -a | sed 's/^[0-9]*<tab>//g'

no loss on spaces in filenames.
no loss on tabs in filenames.

Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com


--0016e6dab0fd3b0790047be23131--