Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have run a specific program in a bash terminal and I closed it by mistake before reading its output. Is it possible to recover the information that was sent to the stdout by taking a look at some sort of bash stdout history log?

Thank you so much.

share|improve this question

migrated from May 21 '13 at 17:36

This question came from our site for professional and enthusiast programmers.

Depending on the configuration of the program you are using, there may be a log with the output. – fedorqui May 21 '13 at 14:33
It's a program that I wrote myself, so I know that I'm not logging anything. (Unless Python generates an automatic log... does that exist at all?) – urinieto May 21 '13 at 14:35
Well I refer to the terminal you are using. For example, PuTTY normally saves logs. – fedorqui May 21 '13 at 14:39
This would be a feature of the terminal-emulator (e.g. xterm, gnome-terminal, etc.) because the shell quite literally has no idea what the program sent to stdout. I've not known a common terminal program that logs by default, so you're probably out of luck. – msw May 21 '13 at 14:39
Thank you so much for your answers. I am using of OSX. Unfortunately, I haven't found any feature like that... – urinieto May 21 '13 at 14:43
up vote 3 down vote accepted

No, there isn't STDOUT history on the filesystem.

If you don't have logging enabled for your terminal then you are out of luck.

share|improve this answer

If you work with a script log then it records everything in that .....

Next time run this at your home directory: script -a yoursession.log That would record all the commands and what ever output you get while you work into the log file.

Man page script command description:

Script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.