Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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'
Source by spin.atomicobject.com #
 
PREVIOUS NEXT
Tagged: #log #ternminal #history
ADD COMMENT
Topic
Name
7+5 =