i686-pc-linux-gnu 上的 7-Zip 9.20
- 创建存档
/usr/syno/bin/7z a "/volume1/test.7z" "/volume1/file.txt" -xr!thumbs.db -xr!@eaDir -xr!@tmp -xr!#recycle -xr!lost+found -xr!.DS_Store -t7z -ms=off -mhe -mmt -mx0 -v10m -p"pa$ss$12"
现在尝试使用相同的密码从 Windows (7-Zip File Manager 16.04) 中的存档“test.7z”中提取文件“file.txt”
在我的例子中,密码总是不正确:(((
最佳答案
$ 被 shell 解释为一个变量。您需要使用单引号而不是双引号
/usr/syno/bin/7z a "/volume1/test.7z" "/volume1/file.txt" -xr!thumbs.db -xr!@eaDir -xr!@tmp -xr!#recycle -xr!lost+found -xr!.DS_Store -t7z -ms=off -mhe -mmt -mx0 -v10m -p'pa$ss$12'
关于linux - 这是 7z 9.20 for linux 中的错误(密码中的 $ 字符)吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42721793/