Is the terminal stdout somewhere logged/archived?

Hey Frens,

on my journey in exploring Linux I’ve come to another question i cannot answer in depth.

I’ve found that the command history is saved and how to avoid that, but what about stdout, stdin and stderr? When I call a command in the terminal is the output anywhere logged or saved like the command history?
It is relevant for a stateless device that shall not save or log any critical information coming from stdout.

So far I’ve discovered that nothing is logged and I could, if I wanted to, create my own logging routine. But I cannot answer this question in depth. Are there any hidden or deep functionalities, in the system, logging stdout?

According to my discoveries when I use and open a pipe stream like “popen” and catch the output, there should nothing be logged. Is that true?

Thank you for your help.

When running shell commands, I sometimes capture stdout & stderr like this:

command > StdOut.out 2> StdErr.out.

Or capture them both in the same file: ‘comand > OutPut.out 2>&1’.

Or use ‘tee’ to pipe the output of a command to a file - something like ‘command | tee OutPut.out’. Any of these viable?

A real life example, I compiled something this morning, and did “make | tee Make.Out” to capture the output of the ‘make’ command.

1 Like