Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: Copying a list of files from a directory to a new directoryby soonix (Canon) |
on Jul 21, 2018 at 17:15 UTC ( [id://1219016]=note: print w/replies, xml ) | Need Help?? |
The -f - is redundant, AFAIK. Then, newer (at least GNU) tar has a -T option (or --files-from) which eliminates the need for xargs, and a -C option (or --directory) which eliminates the need for cd and the parentheses This simplifies the script to(Tested with MinGW on Win7) Of course, your script could be written right out of your head, while I had to open the man page for looking up the letter of that filelist option...
In Section
Seekers of Perl Wisdom
|
|