News for hackers. Stuff that matters.
Re:$!134 can be a nice bash foot shooter if you accidentally... by foxFather81 on Tuesday December 28, 2021 @05:22AM (#29712230)
Not foolproof either, but

export HISTIGNORE="* rm *"

makes calls to rm not show up in the history, for better or worse.

Re:$!134 can be a nice bash foot shooter if you accidentally... by isenhaard on Tuesday December 28, 2021 @06:22AM (#29712633)
I've added now both:

export HISTIGNORE="* rm *"

export HISTIGNORE="rm *"

I think it's even a bit better. Better preventing worst case if possible right from the start. And usually you don't need rm commands within your history. At least I don't.

Re:$!134 can be a nice bash foot shooter if you accidentally... by isenhaard on Tuesday December 28, 2021 @05:32AM (#29712289)
Nice one and easy to apply, thanks! Just added it to my .bashrc