Answers for "how to make a log of my ternminal history"

0

how to make a log of my ternminal 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'
Posted by: Guest on August-05-2020

Code answers related to "how to make a log of my ternminal history"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language