6

Is there any way to disable console message "writing 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

I tried those commands, with same result :(

4

1 に答える 1

7

でコマンドを実行するstraceと、メッセージが次の場所に書き込まれることが示されますSTDERR

write(2, "writing RSA key\n", 16)       = 16
      ^

STDERRしたがって、代わりにリダイレクトする必要がありますSTDOUT

openssl rsa -pubout ... 2>/dev/null
于 2013-05-17T11:48:35.163 に答える