What did I install again?
$ cat /var/log/apt/history.log |grep '^Commandline' | sort -u
Persistent History with Logs
# running bash history https://spin.atomicobject.com/2016/05/28/log-bash-history/
export PROMPT_COMMAND='if [ "$(id -u)" -ne 0 ]; then echo "$(date "+%Y-%m-%d.%H:%M:%S") $(pwd) $(history 1)" >> ~/.logs/bash-history-$(date "+%Y-%m-%d").log; fi'
# must check ~/.logs for full history of all commands since enabling
AND
shopt -s histappend
PROMPT_COMMAND='history -a;history -n'
But so many options...?!
No comments:
Post a Comment