[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
du and wc should be able to read arguments from a file
From: |
Jim Meyering |
Subject: |
du and wc should be able to read arguments from a file |
Date: |
Thu, 18 Sep 2003 09:23:24 +0200 |
"Dan Heller" <address@hidden> wrote:
> While [using xargs] technically "works" in that comands don't "fail", per se,
> it doesn't solve the real problem at hand; the command is reading all the
> info coming in (du, in this case), and tallying up info "on the fly". If
> it then has to terminate and be restarted again (by xargs), it isn't aware
> of it. To du, it's just running anew. To the user, it's supposed to be
> one task. Some commands that are basically stateless (e.g, mv, cp, etc),
> can survive with xargs exactly as you point out.
...
> Anyway, the other method is to support the "take the input from a file"
> approach that Dave pointed out:
Thanks for bringing this up.
It would be useful to give du and wc options to make them
read all file name arguments from a file. Of course, if such
a file were specified as `-', then it would read from stdin.
However, before someone goes off to implement this, here
are a few things to consider.
If the format is simply one file name per line, then what about
files with names containing a newline?
One solution is to require that newlines and backslashes be backslash-escaped.
Another is simply to require that file names be NUL (aka '\0') separated,
like what find's -print0 option would output.
In the interests of keeping things simple, I'm leaning toward the latter.
- ls options: accept stdin, and list files except for..., Dan Heller, 2003/09/14
- Re: ls options: accept stdin, and list files except for..., Richard Dawe, 2003/09/14
- Re: ls options: accept stdin, and list files except for..., Dan Heller, 2003/09/15
- Re: ls options: accept stdin, and list files except for..., Richard Dawe, 2003/09/15
- Re: ls options: accept stdin, and list files except for..., Dan Heller, 2003/09/16
- Re: ls options: accept stdin, and list files except for..., Richard Dawe, 2003/09/16
- Re: ls options: accept stdin, and list files except for..., Dan Heller, 2003/09/16
- Re: ls options: accept stdin, and list files except for..., Richard Dawe, 2003/09/17
- Re: ls options: accept stdin, and list files except for..., Dan Heller, 2003/09/17
- du and wc should be able to read arguments from a file,
Jim Meyering <=
- Re: du and wc should be able to read arguments from a file, Bernd Jendrissek, 2003/09/18
- Re: du and wc should be able to read arguments from a file, Bob Proulx, 2003/09/19
- Re: du and wc should be able to read arguments from a file, Bernd Jendrissek, 2003/09/19
- Re: du and wc should be able to read arguments from a file, Dave Gotwisner, 2003/09/19
- Re: du and wc should be able to read arguments from a file, Richard Dawe, 2003/09/19
- Re: du and wc should be able to read arguments from a file, Dave Gotwisner, 2003/09/20
- Re: du and wc should be able to read arguments from a file, Jim Meyering, 2003/09/20
- Re: ls options: accept stdin, and list files except for..., Dave Gotwisner, 2003/09/15