4 ms·
And then history -c
by flavor8 12y ago
And then history -c
- vacri 12y ago... which will clear your entire history, which you probably don't want. I don't know a shorter way, but to delete one line from history, do 'history', which shows the line numbers, then 'history -d LINE_NUM'. Or, in bash, prepend the command with a space and it won't go into history.
- akerl_ 12y agoOpen new terminal -> unset HISTFILE -> do your greping -> close terminal
- fletchowns 12y agoUnless somebody did a ps while your grep was running... Don't put sensitive stuff in CLI args!
- loqi 12y agoGood point, how about grep -f - 10-million-combos.txt <password> ^D^D
- brianshaler 12y agoDepending on your system and configuration, couldn't you prepend a space to the command to prevent it from being saved into your history? edit: Looks like vacri mentioned this in a peer comment an hour ago. Whoops!
- nmjohn 12y agoThat works if you are using bash, but if you are, for example, using zsh, you would first have to run "setopt histignorespace" which would enable hiding lines prepended with a space in the history (it's off by default).