gpt4 book ai didi

bash - openssl:如何在控制台中禁用 "writing RSA key"消息

转载 作者:行者123 更新时间:2023-11-29 09:12:10 24 4
gpt4 key购买 nike

有什么方法可以禁用控制台消息“写入 RSA key ”?

$ openssl rsa -pubout -outform DER -inform PEM -in /tmp/res/chrome.pem -out 1 > /dev/null 
writing RSA key
$ openssl rsa -pubout -outform DER -inform PEM -in /tmp/res/chrome.pem -out 1
writing RSA key
$ openssl rsa -pubout -outform DER -inform PEM -in /tmp/res/chrome.pem > /dev/null
writing RSA key

我尝试了这些命令,结果相同:(

最佳答案

使用 strace 运行命令显示消息被写入 STDERR:

write(<b>2</b>, "writing RSA key\n", 16)       = 16
^

所以你必须重定向 STDERR 而不是 STDOUT:

openssl rsa -pubout ... 2>/dev/null

关于bash - openssl:如何在控制台中禁用 "writing RSA key"消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16608154/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com