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&#34 ; PA $ $ SS 12#34;
现在尝试提取文件" file.txt"来自档案" test.7z"在Windows(7-Zip文件管理器16.04)中使用相同的密码
在我的情况下,密码始终不正确:((
答案 0 :(得分:0)
shell将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'