I am not even close to an expert in the infrastructure matter but I am trying to lend a hand to someone who's even worse than I am in this matter.
We need to compress 184k specific files into a tar.gz but we don't know how to do it and, through the posts we found, instructs how to compress only through pattern.
The command that we know is the basic one, tar -czvf filename.tar.gz files, but I can't imagine it for a list of specific files, I believe that I'll need a script for it or something similar.
We have a file that contains all the file paths that we need already. I thought of compressing the entire folder as well, but there are over 1 million files in there, so, there is no how to use this approach.
Can someone point me the way that I should follow in order to achieve this?
We have a file that contains all the file paths that we need already
--files-from option of
man 1 tar says:
get names to extract or create from
Your basic command will become something like
tar -czvf filename.tar.gz -T mylist.txt
-hto see what parameters it supports. Otherwise
man tarshould show you the manual page for the program where there might be more descriptive usage examples. — Apr 24, 2018 at 08:35
External links referenced by this document: