I am interested in learning whether a command's output to the terminal is logged somewhere.

Since that can be a bit too generic, what about cat (and ccat) in specific? If I use cat on a file, will the output that I get on the terminal be logged somewhere?

3 Answers 3


In any regular shell, likes of bash, ksh, csh, sh etc, the answer is, NO. If you are running some sort of an audit enabled shell, likes of Power Broker from Beyond Trust (formerly Symark), it is anyone's guess, but most probably it is being logged if someone decided to pay quite a bit of money to licence those audit tools.

If your question is to figure out if someone can see something malicious or something wrong you did, while working on a system and the output from cat could show this mishap, and if your system is actively being monitored (say under one of the many acronyms like SOX, HIPAA, PCI etc.) you might find yourself in hot water. If you are just curious that, a Linux system, in its out of box configuration does something like this, I believe, you'll be disappointed.

  • And a nasty root with ttysnoop?
    – ott--
    Feb 25, 2013 at 15:11

By default, no. But it can be done easily by using the script command. You can put its invocation into your .bashrc if you want it to execute in every terminal.


Many terminal emulators keep at least the contents of the window in memory, often with a backlog of a few hundred or thousand lines; anything the user sees goes there. Most probably this data is never saved to disk, but I wouldn't be completely surprised if some terminals had the possibility to write it somewhere.

You must log in to answer this question.

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