3

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. :)

4

The output is not stored in any files, no. But you can use the script command to record a terminal session. Just run

script

Then 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 named typescript in your current directory. You can use less -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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.