jaywcjlove / linux-command

Linux命令大全搜索工具,内容包含Linux命令手册、详解、学习、搜集。https://git.io/linux

Home Page:https://jaywcjlove.github.io/linux-command

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zip的-f和-u参数似乎写反了

neko-tail opened this issue · comments

网站中介绍为:
-f:此参数的效果和指定“-u”参数类似,但不仅更新既有文件,如果某些文件原本不存在于压缩文件内,使用本参数会一并将其加入压缩文件中;
-u:更换较新的文件到压缩文件内;

在服务器中测试:

$ zip --help
  -f   freshen: only changed files  -u   update: only changed or new files
...
$ zip test.zip 1.txt
  adding: 1.txt (stored 0%)
$ zip -f test.zip 2.txt
$ zip -u test.zip 2.txt
  adding: 2.txt (stored 0%)

@neko-tail 重新整理了参数