I have a terminal command which gives me very long output and I want to check this output from the very first line of it. So far I have to scroll with the mouse and try to catch it, which is quite annoying (especially if I executed this command few times). Is there a way to scroll the output to, say, last executed command?


You can pipe the output of said program to a pager program or a file that you can scroll through at your leisure.

To the less pager: the-program --args 2>&1 |less

To a file: the-program --args 2>&1 >> output.log

|improve this answer|||||
  • what does 2>&1 stands for? – wasd Mar 9 '18 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.