-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Aaron Peterson on 11/30/2008 5:16 PM: > Hi, > A feature request for du, a way to sum from a list of files without > doing tr \n \0
Thanks for the report. You didn't mention which version of du you are using. du has supported the option --files0-from since coreutils 5.3.0, in 2005. The latest stable version is 6.12, and beta 7.0 is also available. > $ tr $'\n' $'\0' <files.list >files0.list This doesn't do what you think. $'\0' is equivalent to the empty string, not the string containing a NUL byte; you need '\0' (not $'\0') if you want to manage NUL bytes with tr. By the way, tr understands '\n', so you don't have to resort to the less-portable $'\n'. > $ du -csb --from-files0 files0.list | tail -n1 > # note the additional tail command that also could be avoided > # if there were an option to only display the grand total Oh, so you are asking for a way to show only the grand total, in addition to --files0-from. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkzQKEACgkQ84KuGfSFAYA1qQCgq4Kc4YdkINnqEwW5cI528z/p atEAoM2LQmxkKQRuDJrtq4tkgLDA/hnC =MIvW -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils