Is there any way to log every that was displayed in gnome-terminal?
for example I have a complex command
doSomethingThatPrintoutsAlot ; doSomethingThatPrintoutsAlot2 ; doSomethingThatPrintoutsAlot3
I can add > file
, but than I would have to do it for each command and I have to use tail in another console to see the output. maybe gnome-terminal support logging everything?
there is .bash_history, so …. it might also support this.
Best Answer
The
.bash_history
file only stores the command history, not the output. Skimming throughman bash
it does not seem to support that kind of logging.However there is the
script
command that is able to log the output of any terminal. The usage is quite simple:The output can be read from
~/mylog
.