Post AWqSTqSxSEAjHLfLV2 by hyde@lazybear.social
(DIR) More posts by hyde@lazybear.social
(DIR) Post #AWqSTph6K9tIsvH7uC by hellomiakoda@pdx.social
2023-06-18T22:22:45Z
0 likes, 0 repeats
Simple #Linux question:Is there a command to clear the terminal history?Is there a command to remove one entry from the terminal history?I accidentally typed a password where it didn't belong. This particular time, it's on a machine I'm not all that worried about a password chilling on terminal history, but this would be very good to know. It happens from time to type, since my brain sometimes runs faster than my fingers and shit gets put on the wrong line.
(DIR) Post #AWqSTqSxSEAjHLfLV2 by hyde@lazybear.social
2023-06-19T09:34:05Z
0 likes, 0 repeats
@hellomiakoda If you use bash : history -cwill remove all your historyTo remove a particular line I use this little script that I have in my dotfiles : for pattern in "$@"; sed -i /$pattern/d $HISTFILEthen you call it like this: eraser.sh TheThingYouWantToRemoveor if you prefer, just edit your $HISTFILE :)