To clear shell history, type the following command:
$ history -c
Or remove .bash_history file
$ rm -rf ~/.bash_history
Turn off shell history
To turn off shell history for all users, type the following command as root
# echo "unset HISTFILE" >> /etc/profile
To turn off shell history for a specific user, type the following command
$ echo "unset HISTFILE" >> /home/USER/.bash_profile
Display shell history
To display shell history, type the following command
$ history | more
Sample outputs
74 exit 75 cd /etc/samba/ 76 ll 77 vi smb.conf 78 exit 79 cd /home/site.com/scripts/ 80 dir 81 cd cassandra/ 82 dir 83 cd conf/ 84 duir ...
Related Posts:
- What is the role of this variables in php.ini file (expose_php – allow_url_fopen – register_globals) ?
- How To Find The Linux Kernel Version ?
{ 1 comment… read it below or add one }
it is great. i came to learn something here.