Jan
22
2008
22
2008
Shell tip: Clear the command history and screen when you log out
Under Tips & Tricks By chandu
For security reason you may want to clear the history file and the screen when you hit CTRL+D or type logout command as you dont want to left content on screen (i..e avoid an information leak). Some Linux distro may clear the screen but others do not clear the screen when you logout.
When a login shell exits, bash reads and executes commands from the file ~/.bash_logout, if it exists. Basically you can use this file as the individual login shell cleanup file, executed when a login shell exits.
Read the Full Article:
Shell tip: Clear the command history and screen when you log out
