tech-userlevel archive

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

Re: bin/44246: enhance mv to work better with xargs

In article <>,
James K. Lowden <> wrote:
>On Sat, 12 Jan 2013 20:21:59 -0600
> (Eric Schnoebelen) wrote:
>> I've taken a look at bin/44246 and attempted to implement an
>> enhancement to resolve the PR.
>I really don't see the problem.  
>       $ echo * | xargs mv newdir
>fails, yes, but 
>       $ echo * newdir | xargs mv 
>Acknowledged, sometimes the input to xargs might require a subshell 
>       $(brutal complexity; echo newdir) | xargs mv
>to acheive the same ends, but I agree with Mouse: are we going to
>change every utility that requires arguments in a specific order?  

That is very dangerous if the expansion exceeds ARG_MAX - 4096.
At least it will not do what you expect and you'll have to go fishing
around to find your files.


Home | Main Index | Thread Index | Old Index