Re:When did I run that command? Update your Bash prompt with...
by kyuudou on Sunday April 19, 2020 @07:02AM
(#22914963)
I'm sure most know this but if anyone thinks this is a way of doing forensics, keep in mind it can be easily skipped over by doing a non-standard logout, like "kill -9 $$" or if a remote ssh connection gets cut for whatever reason. The command history for a session won't get written until logout by default. A workaround such as forcing each entry to be written to a log file will have to be done to have better assurance of true history.
[ Parent
| on HN ]
Re:When did I run that command? Update your Bash prompt with...
by kubanczyk on Sunday April 19, 2020 @08:41AM
(#22915514)
> forcing each entry to be written to a log file
When I last needed it ~2011, there was a small and simple tool called libsnoopy for that.
Emphasis on "log file" though, the "history file" is a different use case, fundamentally unfit for forensics.