Create zip file and ignore directory structure

后端 未结 7 1081
栀梦
栀梦 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:16

    Use the -j option:

       -j     Store  just the name of a saved file (junk the path), and do not
              store directory names. By default, zip will store the full  path
              (relative to the current path).
    

提交回复
热议问题