문제

I want to add a list of files (a text file contains the list of these files i.e. full windows path of each file) , i want to use cygnus win to add files to a zip archive while preserving the directory structure

도움이 되었습니까?

해결책

Did you try something like this?

tar cvf yourarchive.tar --files-from /dev/null
for file in $(cat YOURLIST); do tar rf yourarchive.tar $file; done
gzip yourarchive.tar

The loop would append all files found in the textfile to your tarfile.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top