Tar archiving that takes input from a list of files

前端 未结 6 2107
[愿得一人]
[愿得一人] 2020-12-22 17:12

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
...
file         


        
6条回答
  •  天涯浪人
    2020-12-22 17:45

    On Solaris, you can use the option -I to read the filenames that you would normally state on the command line from a file. In contrast to the command line, this can create tar archives with hundreds of thousands of files (just did that).

    So the example would read

    tar -cvf allfiles.tar -I mylist.txt
    

提交回复
热议问题