On Wed, Jan 08, 2014 at 07:10:10AM -0500, Tanstaafl wrote:
> Hi all,
> 
> I routinely am logged into a server with multiple consoles (I log in 
> with one (the same) regular user, then su - to root).
> 
> This morning I tried to grep roots .bash_history for a command I ran 
> some time ago, and it wasn't there. I know I ran it, so I'd like to 
> configure my bash history so this doesn't happen again.
> 
> Thinking about it a bit, the first issue I see is... when I am running 
> multiple consoles, each one having been started by first logging in as 
> my normal user, then su - to root, how does this affect the 
> .bash_history file? It seems like there would be a collision of some 
> kind, maybe result in the last one to log out 'winning' (that 
> .bash_history is the one that is saved/stored) or something?
> 
> Maybe... would it be possible to use different regular users, then when 
> each one does the su - to root, have it create a separate .bash_history 
> file based on the original username? That would be perfect.
> 
> I was also considering something like setting HISTSIZE=###, then adding 
> something to the logrotate.conf file to start rotating the history file, 
> so I don't lose anything - but I'm not sure if that would even work.
> 
> So, I'm interested in how others do this... especially on a system that 
> has multiple users managing it.
> 
> Thx... Charles

Long ago living in a country far away on computers long since abandoned, some
friendly sysadmin helped me set this up. For quite some time this has been on
my "TO-DO" wishlist, so your query caused me to search the internet:

http://mywiki.wooledge.org/BashFAQ/088

Hope this helps you and I both append our history for all open terminals.

Bruce
-- 
List replies preferred.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting

Reply via email to