[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


Dan Heller wrote:
> 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.

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.
> 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


Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

reply via email to

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