我需要使用以下命令创建一个zip文件:
zip /dir/to/file/newZip /data/to/zip/data.txt
这是可行的,但是创建的zip文件创建了一个目录 struct ,将目录模拟为原始文件.我不需要很多额外的文件夹.
我在手册页或谷歌搜索中都没有找到答案.
我需要使用以下命令创建一个zip文件:
zip /dir/to/file/newZip /data/to/zip/data.txt
这是可行的,但是创建的zip文件创建了一个目录 struct ,将目录模拟为原始文件.我不需要很多额外的文件夹.
我在手册页或谷歌搜索中都没有找到答案.
你可以用-j
.
-j
--junk-paths
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 directory).