Linux / UNIX: Clear bash history
Q. I'm using CentOS Linux server and how do I clear bash history?
A. Type the following command to clear your bash history:
>~/.bash_history
Another option is link ~/.bash_history to /dev/null:
ln -sf ~/.bash_history /dev/null
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- Clear Linux / UNIX BASH Shell Command Line Cache / History
- Clear mysql command line history stored in ~/.mysql_history file
- Linux and UNIX view command-line history
- How To Search Shell Command History
- Understanding command line shell
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: .bash_history_file, centos_linux, dev_null_file, linux_server, ln_command



Recent Comments
Today ~ 32 Comments
Yesterday ~ 1 Comment
Yesterday ~ 3 Comments
Yesterday ~ 2 Comments
Yesterday ~ 3 Comments