Take the 2-minute tour ×

I'm new to ubuntu using the terminal to code some ruby.

Everytime I run this command it outputs like 600 lines of data that I need to analyze.

But when I try to scroll up to see everything alot of the output is cut off.

Is there any way to change the settings of the terminal or another command prompt program or any other options that I can use to take a look all of the data?

share|improve this question
add comment

3 Answers

up vote 6 down vote accepted

Inside your Terminal Window, go to Edit | Profile Preferences, click on the Scrolling tab, and check the Unlimited checkbox underneath the Scrollback XXX lines row. Click Close and be happy.

share|improve this answer
But this only works for the next time you want to run your command. Is there a way to view the last command which produced output way above? Is there a shell history option? –  astromax Nov 3 '13 at 16:47
If you have had scrollback long enough to overflow your current buffer settings, and then you later change the buffer scrollback settings, there is no way to retrieve output that you had previously not configured your Terminal to remember. The only way to get that information would be to re-run the command. –  Mike Nov 3 '13 at 16:52
Thanks for the info. That's what I figured. –  astromax Nov 3 '13 at 17:19
add comment

Run the command with

> command | less

It will only show you as many lines as it can fit on the screen, and then you can scroll down to read the rest.

share|improve this answer
add comment

I agree with Tudor: "piping" the terminal output into the program less is an effective way to do what you want. To see a list of available actions in less press h. A particularly useful command is / to search the text in less. Note that q quits the program.

Another option would be to use a stdout redirection operator >. So for example you could also run your command as:

$command > output.txt

Then the output of your terminal will be written to the file output.txt which could then be opened with any text editor. Note if you use >> instead of > the output will be appended to the end of the text file instead of overwriting it.

share|improve this answer
add comment

Your Answer


