3 ms·
I’ve run into this several times in my current role. The people who came before me fucked up command history really badly (they were trying to have per-user, pe
by j33zusjuice 4y ago
I’ve run into this several times in my current role. The people who came before me fucked up command history really badly (they were trying to have per-user, per-connection logging, and didn’t know how to do that properly), so a good deal of commands used to spawn containers have been lost over here.
I agree you should never be in this situation (this place is an absolute nightmare), but here I am!
- jmholla 4y agoDo you have any good resources on how to manage this? I've run into similar history management problems with `screen`.
- j33zusjuice 4y agoFor bash, and maybe zsh, I use this in a profile.d script to log history output. HISTTIMEFORMAT=“%F %T $(logname) $(pwd) “ if [ ! -d $HOME/.history ] then mkdir -p $HOME/.history fi PROMPT_COMMAND=‘echo “$(history 1)” >> $HOME/.history/$(date “+%F”) fi export PROMPT_COMMAND I suppose adding `readonly PROMPT_COMMAND` would be a good idea so no one overwrites it, but most people wouldn’t even think to look for it. I don’t think this would do much for handling screen history, though.
- v3ss0n 4y agoresh is my favorite
- v3ss0n 4y agoresh is my favorite https://github.com/curusarn/resh https://github.com/curusarn/resh