in reply to Re: Copying a list of files from a directory to a new directory
in thread Copying a list of files from a directory to a new directory
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)tar c -C source -T mylist.txt | tar xC dest
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...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Copying a list of files from a directory to a new directory
by roboticus (Chancellor) on Jul 21, 2018 at 20:27 UTC |