When I enter a command with a long output such as locate linux, the output is too long to show on the current terminal screen, and so the terminal will scroll right to the end of the output. How can I disable this behavior, such that window stays on the first line of the output?

Alternatively, is there a way to get the window back to the last $ line without having to actually look for where that line is?

I have tried Edit > Profile Preferences > Scrolling and disabling Scroll on output, although this does not achieve what I am trying to do.


Short answer: you can't, at least not exactly the way you want.

More useful answer: you can achieve what you want by piping the output to something like more or less , for example :

locate linux | less

This will pause the output scroll at the end of each page, where the page length is defined as the terminal height.

  • Alright, I found that using less -X achieves close to the feature I am looking for, such that the output remains in the terminal after exiting. – jII Feb 3 '15 at 19:54

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.