Note that the standard (POSIX/Unix) command to create a
tar file is
pax combines the traditional
To create a tar file, use the write mode:
pax -w < abc.txt > allfiles.tar
To copy instead, use the copy mode:
pax -rw < abc.txt Folder/
Note that it recreates the directory structure into
Folder. If you want to flatten it, you could do:
pax -rws'|.*/||' < abc.txt Folder/
(see the man page if you want to copy permissions or other attributes as well.
pax expects one file per line, which means files whose name contains newline characters cannot be copied that way, some
pax implementations support a
-0 option to allow a
NUL delimited file list instead).
cpio -pd < abc.txt Folder/
tar -cf - -T abc.txt | (cd Folder && tar xf -)
Another option to allow any character in file names is (with GNU
xargs cp -t Folder < abc.txt
(that flattens the directories).
xargs expects a blank (space, tab, newline) separated list, when you can escape those separators with backslash, single or double quotes. So you can have a list like:
"file with space"
'file with "quote" and