0

Example: man -k ls

Output: A LOT of text, so much that I can only read the last 20 lines.

I don't want information on how to scroll up through the output. I would like to know, if possible, how to format/control the output so that only the first 20 lines are shown, then, when I press enter/scroll down, the next 20 lines are shown.

This way I can read all the output at my own pace. The output waits for me to tell it to continue. Is there a simple command for this?

Notice: This isn't a text file I'm outputting (I think), its just standard output, and way too much, so much so that it is unreadable except for the last 20 lines.

2 Answers 2

1

Can you just pipe the output to less or more? Or redirect the output to files and then go through them after the output is generated?

E.g. To redirect stdout to a file: prompt> command -args > output.txt

More information on redirecting stdout and stderr can be found here: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, pipe with less/more! I'm just starting out, learning the absolute basics. This is exactly what I was asking for.
0
man -k ls | less

Found the answer, literally, right after I posted this question...

Apparently, the "| less" uses pipelines to make any command have scrolling output. I got this info from another site through a Google search.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.