3

I am using a virtual machine. It's display is very small.

When I use the following command output goes out of the screen and I cannot view previous content that came from output

openssl --help

I tried less, more, redirection but neither worked

openssl --help | less
openssl --help | more
openssl --help > output.txt

1 Answer 1

4

openssl does not have any --help argument hence the output of openssl --help is being sent to STDERR (file descriptor 2).

When you are using openssl --help | less, you are passing STDOUT of openssl to STDIN of less, as the error message is on STDERR, you can do:

openssl --help |& less

to pass both STDOUT and STDERR to the STDIN of less.

or pass just STDERR:

openssl --help 2>&1 >/dev/null | less

2>&1 redirects STDERR to STDOUT, >/dev/null sends STDOUT to /dev/null.

Again, these are just hacky solutions as there is no option like --help, you can instead try

man openssl
2
  • Actually output for openssl help and man openssl was different. That's why I used openssl help. I would also like to know what 2>&1 means in your answer.
    – afzalex
    Mar 20, 2016 at 7:46
  • @afzalex Check my edits
    – heemayl
    Mar 20, 2016 at 8:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .