JC's notes
sharing my journey on linux, one note at a time

Search

Selectively deleting your bash history

It is possible and easy to selectively remove entries from your bash history (say, for commands involving a password), using the following commands:

history | grep <stuff I am looking for>
history -d <corresponding number>
history -w

If you want to delete the whole history:

history -c
history -w

The ‘w’ flag is necessary to write the changes to the history file (~/.bash_history) as this is done asynchronously.

Full details at Raw Syntax.

13 août 2013 · jc · Posted in linux · Tagged bash, history, security
← Previous Next →

Articles récents

  • Managing TV overscan on RetroPie (and pretty much any application)
  • VNC plugin for Remmina not found after upgrade
  • Modifying track data in Matroska (mkv) files
  • Splitting a Matroska (mkv) file by chapters
  • Switch buttons on Wacom Graphire on XFCE

Tags