How to delete One line on tcsh history....??

Christopher Cowart ccowart at rescomp.berkeley.edu
Thu May 15 22:12:16 UTC 2008


Agus wrote:
> I've been trying to delete one line from my user tcsh history cause i made a
> su and it seems didnt hit enter very well so i typed the password on the
> console...Now anyone that can look my history will see my pass...
> 
> I tried to edit and delete a few lines but it all comes again....tried
> history clear but when i login again it apperas all again..hehe...
> Its so secure and cool tcsh taht i have no idea how to do it...been a bash
> user...

I use this strategy with bash, so YMMV:

$ vim .bash_history
(kill line)
$ kill -9 $$

$$ should expand to the pid of the running shell; if it doesn't in tcsh,
sub it out yourself. 

The kill -9 prevents the shell from doing it's normal exit stuff (like
writing out the history) and just kills the process. You'll need to kill
-9 any shell that you launched while the "bad" line was in the history
file.

-- 
Chris Cowart
Network Technical Lead
Network & Infrastructure Services, RSSP-IT
UC Berkeley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 825 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080515/2ea54685/attachment.pgp


More information about the freebsd-questions mailing list