I had a program print lot of data on the terminal. The terminal scrolled over and now I cannot see all the data. Some of it is lost. How do I get it back ?
|
feedback
|
migrated from stackoverflow.com Nov 25 '10 at 19:03
This question came from our site for professional and enthusiast programmers.
|
You can use various strategies to save the output of programs that print a lot of data:
| |||||||||
feedback
|
|
If you know how to compile a kernel you can activate the following option in the kernel configuration and let the kernel save the scrollback buffer in RAM instead of the VRAM. You can also set the buffer size. There is practically no limit to scrolling back then because even 1MB will give you about 256 pages of scrollback. You can find the option in: Device Drivers -> Graphics support -> Console display driver support -> VGA text console -> Enable Scrollback Buffer in System RAM (CONFIG_VGACON_SOFT_SCROLLBACK) Alternatively you could use screen that doesn't depend on the kernels buffer and has its own. The same applies to terminal emulator you use in X like Terminal, konsole or xterm. | |||||
feedback
|
|
While you can't get it back once it's out of the window, you can capture it into a file next time you run it. To just pump it into a file: To see it and put it in a file: | |||||||
feedback
|
lessis not an option? – khachik Nov 24 '10 at 20:16