Skip to content

Instantly share code, notes, and snippets.

Last active October 19, 2022 15:39
What would you like to do?
Recording bash's standard out

If you want to store all stdout while runing an interactive bash:


curl -Lo /usr/local/bin/cybash
chmod +x /usr/local/bin/cybash


> cybash

... start bashing as usual

all stdout is saved into timestamped terminal-XXX.log files


actually you don't even need 2 lines

bash --rcfile <( echo 'PS1="RECORD> "') > >(tee /tmp/terminal-$(date +%m%d-%H%M).log)
exec 1> >(tee /tmp/terminal-$(date +%m%d-%H%M).log)
bash --rcfile <( echo 'PS1="RECORD> "')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment