It is possible to instruct history to ignore a command when executing a command.

# export HISTCONTROL=ignorespace
# ls -ltr
# pwd
#  service httpd stop [Note that there is a space at the beginning of service]
# history | tail -3
67  ls -ltr
68  pwd
69  history | tail -3

Post By Editor (2,827 Posts)

Website: →

Connect