Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If your intent is to hide entries that contain passwords or other sensitive CLI data, but you still would like to keep the convenience of command-line history, then add HISTCONTROL=ignorespace to your bashrc file.

Whenever you enter a command that should be hidden from your history list, prefix it with a SPACE - it will not be added to the history file. If you accidentally add a sensitive entry, use history to find the entry ID and then history -d ID to remove it.

The advantages of history, but the security of not storing sensitive data in the history file!