Linux Mastering Development

History command – ignoring specific commands

I am trying to create an audit file. I have seen you can use history to see what commands have been executed.

This can be modified to show the timestamps and other features such as blocking specific commands from being shown in tutorials, but I am finding it is not working as featured in the tutorials

adds time:


supposed to remove ls, pwd, cd and date:

export HISTIGNORE='ls:pwd:date:cd:'

history output after entering these commands:

 2077  2020-04-30 11:47:25 export HISTIGNORE='ls:pwd:date:cd:'
 2078  2020-04-30 11:47:33 cd ..
 2079  2020-04-30 11:47:41 history
 2080  2020-04-30 11:48:25 cd a2
 2081  2020-04-30 11:48:32 cd a2
 2082  2020-04-30 11:48:38 history

Am I viewing dated tutorials or have I messed up the command?

Leave a Reply

Your email address will not be published. Required fields are marked *