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

On Sun, Jan 13, 2013 at 08:47:53PM +0400, Aleksej Saushev wrote:
> (Michael van Elst) writes:
> > mouse%Rodents-Montreal.ORG@localhost (Mouse) writes:
> > And with a standard POSIX xargs it is:
> >
> > ls -1 | xargs -I X mv X newdir
> Except that it doesn't work in modern world where you can easily find
> files with whitespace (and apostrophes!) in name.

There shouldn't be any problems with 'odd' filename characters, but
the -I will execute the command for every input line (aka filename).
Which isn't really the point of involving xargs.


David Laight:

Home | Main Index | Thread Index | Old Index