bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Purge History of rm commands


From: Roger
Subject: Purge History of rm commands
Date: Sun, 18 Sep 2011 21:18:02 -0800
User-agent: Mutt/1.5.21 (2010-09-15)

I'm stumped on this as my history is in the format of:

$ tail ~/.bash_history
#1316296633
man bash
#1316296664
bash -xv
#1316372056
screen -rd
#1316375930
exit
#1316392889
exit

Is there a method of purging the history off all rm commands with such a file
format?  I've tried using history | find | grep | sed, but the history doesn't
accept more then one history command line number.

I'm guessing the next easiest method is to learn awk/gawk so I can edit the
above .bash_history file.

The easiest method, just open the history file with VI/VIM and start deleting
the 20 or so lines... which I'll likely start doing now. ;-)

... or did I miss something?

-- 
Roger
http://rogerx.freeshell.org/

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]