Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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 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?

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
And a nasty root with ttysnoop? – ott-- Feb 25 '13 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.

share|improve this answer

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.

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.