Oct 7, 2018

[HDGEM] How to prevent a command from being recorded in Linux history

To avoid a command being recorded in history, you must set HISTCONTROL environment variable's value as "ignorespace" or "ignoreboth".

export HISTCONTROL=ignorespace

Prefix blank space in-front of the command you don't want to be recorded.

$ <space here> sudo date

Posted By Blogger to HDGEM at 4/07/2017 01:18:00 PM