2

In the work that I am doing, sometimes the output of a certain command is so large, that it becomes very challenging to find the first few lines of the output. By large I mean so large that scrolling by keys is too slow, and scrolling with the mouse via scrollbar just misses the right line each time because it's too fast.

I want to scroll up the whole "page" of the terminal to where my previous command has been inputted. Note that I am not asking how to get the previous commands behind my cursor — I am aware that that can be done by pressing the "up" button.

Is there a way to do this?

0

3 Answers 3

2

You could redirect the output into a file then edit it with gedit

COMMAND > output.txt

then

gedit output.txt
1

If you want to read the long output from start where you enter the command you can use less command in pipeline.

eg:

ls | less

It would be like this

'your command' | less
0

Yep, to renter it, press up, and then it will fill. You can also edit it, to change it rather than retyping it.

Or you can run !! if you don't need to edit it...

This is probably one of the best terminal tricks!

2
  • Just to add, if you don't need to edit your last command, you can also use !! to rerun the last command. Aug 3, 2014 at 16:43
  • Thanks, but thats not what I meant to ask. I have made corrections to make myself more clear.
    – Man
    Aug 4, 2014 at 0:25

You must log in to answer this question.

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