4 ms·
This is lovely, and I should integrate it with the chronology based approach I've been using. I keep an infinite log by appending a timestamp to the beginning
by inciampati 7y ago
This is lovely, and I should integrate it with the chronology based approach I've been using.
I keep an infinite log by appending a timestamp to the beginning of the lines written to my history file, then merging this into a growing log with an hourly cronjob that runs sort -n | uniq on the file and the new version of the shell history. This way the shell history file is just a buffer. It doesn't get too big to cause corruption or other issues with reverse search on the command line. I just grep my way through the big history file to figure out what I was doing and when.