[Centos] help with xargs and mv
James B. Byrne
ByrneJB at Harte-Lyne.ca
Wed Feb 9 16:45:06 UTC 2005
On 8 Feb 2005 at 23:14, Dag Wieers wrote:
> Compare this:
>
> echo -e "file1\nfile2\nfile3" | xargs echo '{}' blah
>
> with:
>
> echo -e "file1\nfile2\nfile3" | xargs -i echo '{}' blah
Thank you for the advice on the -i switch. I had tried this
earlier. With the -i '{}' argument added then this is the result:
# ll -d ./mqueue/offline
drwxr-xr-x 2 root root 4096 Feb 8 14:03 ./mqueue/offline
#
# cat workmv | xargs -i '{}' mv ./mqueue/'{}' ./mqueue/offline
xargs: {}: No such file or directory
#
# cat workmv | xargs -i '{}' mv ./mqueue/'{}' ./mqueue/offline/
xargs: {}: No such file or directory
#
# cat workmv | xargs -i '{}' mv --Target-Directory=./mqueue/offline ./mqueue/'{}'
xargs: {}: No such file or directory
#
# cat workmv | xargs -i '{}' mv --Target-Directory=./mqueue/offline/ ./mqueue/'{}'
xargs: {}: No such file or directory
#
P.S.
Also, thank you very much for the depository that you run. I use
several of your packages.
Regards,
Jim
--
*** e-mail is not a secure channel ***
mailto:byrnejb.<token>@harte-lyne.ca
James B. Byrne Harte & Lyne Limited
vox: +1 905 561 1241 9 Brockley Drive
fax: +1 905 561 0757 Hamilton, Ontario
<token> = hal Canada L8E 3C3
More information about the CentOS
mailing list