Wednesday, December 13, 2006

xargs

Found a really useful tool today call xargs used it to copy a list of files, I had a file "static.list" which had a list of files which I needed to copy one per line.

Running the following

cat static.list |xargs -t -i rsync -v CB_DATA/{} rsync://192.168.0.226/opt/advancesbak/CB_DATA/

Run the rsync command

rsync -v CB_DATA/filename rsync://192.168.0.226/opt/advancesbak/CB_DATA/

for each filename listed in "static.list"

No comments: