jaywcjlove / linux-command

Linux命令大全搜索工具,内容包含Linux命令手册、详解、学习、搜集。https://git.io/linux
https://jaywcjlove.github.io/linux-command
MIT License
31.68k stars 6.1k forks source link

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

Closed neko-tail closed 10 months ago

neko-tail commented 10 months ago

网站中介绍为: -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%)
jaywcjlove commented 10 months ago

@neko-tail 重新整理了参数