Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you care about your command history, I would advise against doing this unless you are truly a sed expert:

    $ sed -i '/secret-command/d' $HISTFILE  # deletion of history line containing 'secret-command'
Because if you get it even slightly wrong, you could easily hose your entire history. If it were me, I would just use an editor to delete that line (or two, if timestamps are enabled).


And if you know don't want a command in your history, prefix it with a space.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: