3 ms·
Not foolproof either, but export HISTIGNORE="* rm *" makes calls to rm not show up in the history, for better or worse.
by foxFather81 5y ago
Not foolproof either, but
export HISTIGNORE="* rm *"
makes calls to rm not show up in the history, for better or worse.
- isenhaard 5y agoNice one and easy to apply, thanks! Just added it to my .bashrc
- isenhaard 5y agoI'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.