这个报错的原因是要压缩的文件是个符号链接文件,但指向的文件不存在,
解决方法是加上-y参数,意思是store symbolic links as the link instead of the referenced file,也就是保存符号链接。
zip -r -y test.zip test/
参考:“zip warning: name not matched” while compressing a directory - Unix & Linux Stack Exchange
解决zip压缩符号链接错误

本文介绍了一种在使用zip命令压缩文件时遇到特定错误的解决办法。当要压缩的是一个指向不存在文件的符号链接时,会出现警告。解决此问题的方法是在zip命令中加入-y参数,指示zip程序将符号链接本身而非其指向的内容进行保存。
1726





