Is the terminals output (i.e. not commands) history hiding somewhere that lets me do something like..
grep "foo foo \d{5}" ~/.terminal
I'm aware I can simply pipe stuff to grep, or save it to a file rather than putting it in the terminal. It's just that sometimes I've had a program output some stuff I'd like to search through but would rather not rerun it just for greps benefit. :)
The output is not stored in any files, no. But you can use the
script
command to record a terminal session. Just runThen run your commands as usual. When you type
exit
, you will exit the script program. All input and output can then be found in a file namedtypescript
in your current directory. You can useless -R typescript
to read and search through it.As usual, it's a good idea to read the manual before using a new command.
man script