Tar archiving that takes input from a list of files

I have a file that contain list of files I want to archive with tar.
Let’s call it mylist.txt

It contains:

file1.txt
file2.txt
...
file10.txt

Is there a way I can issue TAR command that takes mylist.txt as input?
Something like

tar -cvf allfiles.tar -[someoption?] mylist.txt

So that it is similar as if I issue this command:

tar -cvf allfiles.tar file1.txt file2.txt file10.txt 

6 Answers
6

Leave a Comment