0


We can scroll up/down using shift+up/down to see the content of terminal. but is there any way by which we can save the whole content in file. Since we can see the content, so I think there must be a buffer or file which is managed by the operating system. I need this to search through the content using grep ( manually going up/down and looking for desired text is cumbersome.)

1 Answer 1

1

If you're using gnome-terminal, you can use "script" to log everything in a terminal as mentioned here. If you're using konsole, I think you can you can hit (don't have a system handy to double check)

Edit->Save History As

There was supposed to be a patch to gnome-terminal to allow the same, but I don't know if it was ever implemented. Otherwise you can simply highlight what you want and save it to buffer then open your favorite editor.

2
  • seems script need to be done manually each time. I was wondering there must be some buffer where terminal's output is saved.
    – Peeyush
    Oct 8, 2011 at 22:15
  • Though i found these steps useful, # Use <shift>Home to seek to the top of the buffer. # Use mouse button 1 to drag across the top line, (or triple-click to do it). # Use <shift>End to seek to the bottom of the buffer. # Use <shift> and mouse button 1 to extend the selection to the bottom line. then copy and paste anywhere you want.
    – Peeyush
    Oct 8, 2011 at 22:17

You must log in to answer this question.

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