originally posted by isacklow
i have the following snip at the beginning of my file. it does some cleanup and covers my butt in case i do get monitored, hacked or something happens to my laptop. since i do a lot of admin work from my account and root i can't take a chance that a password or critical command might get misplaced. the cool part is that the history is live as long as i am logged in to that tty (which is not normally for more than a few hours since i have to logout/disconnect when i go from home to work and back). once i am logged out it gets flushed.. i also noticed that since i have more that a few ttys running a at time (11 outside of x and 30-40 inside of x) it also keeps all the histories seperate. i'm not sure if this is normal behavior or not. one of my friends told me about the history trick after he saw this done when a hacker took over his system and used this method to cover his tracks.
the other commands just make sure that my main dotfiles are always linked to my most updated versions that i keep in my scripts directory. linking bash_login and bashrc to the same file allows me to use various terminal apps since not all of them look for bashrc or bash_login.
ln -sf /dev/null $HOME/.bash_history 2>/dev/null
ln -sf $SD/dotfiles/bash_login $HOME/.bash_login 2>/dev/null
ln -sf $SD/dotfiles/bash_login $HOME/.bashrc 2>/dev/null
ln -sf $SD/dotfiles/bash_logout $HOME/.bash_logout 2>/dev/null
ln -sf $SD/dotfiles/exrc $HOME/.exrc 2>/dev/null