Last active
August 29, 2015 14:26
-
-
Save laetrid/e080800c28dec0a448af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
man script | |
To record all new bash sessions: | |
Add: | |
test "$(ps -ocommand= -p $PPID | awk '{print $1}')" == 'script' || (script -t 2> $HOME/shell_logs/$(date +"%Y-%m-%d_%H%M%S").timing -f $HOME/shell_logs/$(date +"%Y-%m-%d_%H%M%S").log) | |
to $HOME/.bashrc | |
And create directory $HOME/shell_logs/ | |
script record all terminal characters including control, color, etc | |
to view *.log file, you can use: | |
less -r <filename>.log | |
Although you can replay your session with: | |
scriptreplay <filename>.timing <filename>.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment