Jan
22
2008

Shell tip: Clear the command history and screen when you log out

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

Leave a Comment

Name (required)

Email (required)

Website

Comments

2008 (c) Tech Tips, Using the ReviewSaurus Theme : Powered by WordPress