Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash history

# Set time format of bash history (current session)
HISTTIMEFORMAT="[%D_%T] "
# Do not add item to bash history (current session)
HISTCONTROL=ignoredups    # ignore adding duplicate lines to history
HISTCONTROL=ignorespace   # ignore adding lines start with space to history
HISTCONTROL=ignoreboth    # ignore both dupes and lines started with a space
# Set number of history elements (current session, default 500)
HISTFILESIZE=2500
Source by www.cyberciti.biz #
 
PREVIOUS NEXT
Tagged: #bash #history
ADD COMMENT
Topic
Name
1+9 =