Create zip file and ignore directory structure

后端 未结 7 1078
栀梦
栀梦 2020-12-07 10:38

I need to create a zip file using this command:

zip /dir/to/file/newZip /data/to/zip/data.txt

This works, but the created zip file creates

7条回答
  •  甜味超标
    2020-12-07 11:23

    Somewhat related - I was looking for a solution to do the same for directories. Unfortunately the -j option does not work for this :(

    Here is a good solution on how to get it done: https://superuser.com/questions/119649/avoid-unwanted-path-in-zip-file

提交回复
热议问题