bash tar: 无法在 freebsd 中打开“/dev/sa0”错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8687502/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 01:14:03  来源:igfitidea点击:

tar: Failed to open '/dev/sa0' error in freebsd

bashfreebsdtar

提问by ibrahim

I have a bash code below under freebsd

我在 freebsd 下有一个 bash 代码

tar --files-from $files --exclude-from $xfile -zc \
| openssl aes-256-cbc -salt -pass pass:$PASSWORD -out 

I have no problem with $files $xfile $PASSWORD or $1 variables, but it gives below error when I run it. Do you know how can I fix it? Thanks for any help...

我对 $files $xfile $PASSWORD 或 $1 变量没有问题,但是当我运行它时会出现以下错误。你知道我该如何解决吗?谢谢你的帮助...

tar: Failed to open '/dev/sa0'

tar: 无法打开“/dev/sa0”

回答by Basile Starynkevitch

I suggest passing -f -to tar(in addition of the other arguments) to indicate that the tar file you want to create is the stdoutstream.

我建议传递-f -tar(除了其他参数之外)以指示您要创建的 tar 文件是stdout流。