3 ms·
I keep an unlimited amount of my bash history using the method outlined in this stackoverflow answer[0]. I've been doing it for almost 2 years now now and my hi
by shpx 8y ago
I keep an unlimited amount of my bash history using the method outlined in this stackoverflow answer[0]. I've been doing it for almost 2 years now now and my history file has about 50,000 commands and is under 2MB.
Maybe it makes ctrl-r more useful. Maybe I'll find something interesting to do with this data later, but it's pretty useless. It's a sort of personal diary I might scroll through years in the future.
For privacy, you could add something like this to your .bashrc
alias forget="unset HISTFILE"
then invoke the "forget" command to stop saving commands in that shell session, including the "forget" command you just typed but not any command before that.
[0] https://stackoverflow.com/a/19533853/3064538 https://stackoverflow.com/a/19533853/3064538