← Learn
Dangerous
history -c && cat /dev/null > ~/.bash_history

linux · bash · Beginner

Clears the in-memory shell history and then empties the file it would be written to. Nothing here is a destructive-sounding verb, but the result is that the record of what was typed is gone.

Signals to notice

  • erases both the live history and the file it persists to
  • runs entirely with normal user permissions, so nothing prompts

Think you can spot these under time pressure?

Start Training

More Persistence