Skip to content


Linux, tar a list of files

In Linux, using the terminal, compressing files is easy. Just type

tar -czf archive.tar.gz /what/to/compress

How to compress certain files of a folder?

  • Create a list of the files to compress.

e.g. create a list of all *.txt files in a directory:  ls *.txt > filelist.txt

  • Use the following command to compress the files in the list

tar -czf output.tar.gz --files-from test.out

 

Posted in ITechnische Post.

Tagged with , , , , , .