Linked by Tony Steidler-Dennison on Thu 10th Jul 2008 16:37 UTC
Thread beginning with comment 322605
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.





Member since:
2006-12-05
alias clh="history -c && exit"
This will allow you to clear the bash history and then send the exit command by simply typing "clh". If you've got a terminal opened and have used su to become root or another user, typing this in will clear root's (or whoever you've switched to) bash history and then return you to your original user. If you're yourself (ie. haven't used su to become root), it will clear your own history and close the terminal. Of course, it has to be in the .bashrc files of any user who wants to use it (in my case, both my own personal home and /root). This will also completely wipe out the history, which may not be desired by everyone.