For example,
zip -r output.zip file1 file2 file3
I need to put the file list "file1 file2 file3" into a text file "input_list.txt", then use the command like:
zip -r output.zip -input input_list.txt
After zip -help, the only relative information it gave is this:
-@ read names from stdin
So I tried:
'cat input_list.txt'>'zip -r -@ output.zip'
But it doesn't work.
Yes you can compress multiples files listed in a list text file
As you understood, the
-@
option reads the source files names from stdinSo, simply redirect the list to the zip program stdin
note that
-r
is required if thefiles.list
contains directories