bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: du --files-from feature request


From: Brian Dessent
Subject: Re: du --files-from feature request
Date: Sun, 30 Nov 2008 17:44:51 -0800

Aaron Peterson wrote:

> I spend many hours trying to figure this out / and searching for solution.
> It turns out that the \0 delimited list requirement was very painful.
> I wish I could cat the output of find  into du and get the total

It's meant to be used like:

$ find . -type f -print0 | du --files0-from=-

Note also that xargs takes -0 for the same reason:

$ find . -type f -print0 | xargs -0 command

Using tr is not the intended use pattern, as it completely misses the
point.  \0 is the only character that cannot be part of a filename
(other than '/'), so the only reliable way to deal with arbitrary
filenames without complicated quoting is to \0-delimit them.  Using tr
to convert newlines to \0 fails if you have filenames with newlines in
them, not to mention that it's pointless overhead.

Brian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]