当我发出命令时zip -u hello.zip -f hello
,它告诉我只指定一个动作!!我不知道如何解决这个问题。
答案1
这 zip 手册页 说:
-f
--freshen
Replace (freshen) an existing entry in the zip archive only if it has been modified more recently than the version already in the zip archive; unlike the update option (-u) this will not add files that are not already in the zip archive.
-u
--update
Replace (update) an existing entry in the zip archive only if it has been modified more recently than the version already in the zip archive.
这两个选项是矛盾的——你应该选择其中一个。