[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ls options: accept stdin, and list files except for...
From: |
Richard Dawe |
Subject: |
Re: ls options: accept stdin, and list files except for... |
Date: |
Tue, 16 Sep 2003 21:32:59 +0100 |
Hello.
Dan Heller wrote:
[snip]
> While it 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. Stateful commands,
> (du, dd, tar) do not always have that luxury.
[snip]
I don't really understand how a dd command-line is going to get very long. Can
you really give it that many options. I guess it's just an example of a
stateful command.
FWIW tar has an option to take filenames from a file.
I'm not sure what you can do about du (as it stands) and making it appear that
multiple invocations appear as one. Perhaps you could wrap it in a shell
script that munges the output, so it appears as one invocation.
> But, it's not an argument against the "stdin" approach either. Not to beat
> a dead horse on the point, but the UNIX heritage is all about having small,
> light processes that can be strung together by pipes.
[snip]
> If it weren't for the fact that this is all so easily implemented, I
> could see the resistance. But, its implementation is so simple, standard,
> and almost-ubiquitous in existing utils, why not just finish the job and
> support it for all file-utils?
I don't know what resistance you are talking about. Your original bug report
and the thing you are talking about now are completely different. You
originally complained about long command-lines. Now you are talking about
programs where you can't split the command-line. Now you've said what the real
problem is, your request to make du, etc. take filenames from stdin makes more
sense.
Regards,
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- 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 <=
- 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, 2003/09/18
- 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