Register
It is currently Fri Oct 24, 2014 10:53 am

an interesting part of my bash_login/bashrc


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Tue May 17, 2005 10:33 am   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 669
Location: Des Moines, Iowa
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.

Code:
SD="/data/scripts";
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


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP