public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Questions about History file
@ 2014-01-08 12:10 Tanstaafl
  2014-01-08 14:01 ` Bruce Hill
  2014-01-08 15:56 ` Alan McKinnon
  0 siblings, 2 replies; 6+ messages in thread
From: Tanstaafl @ 2014-01-08 12:10 UTC (permalink / raw
  To: gentoo-user

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-09 21:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-08 12:10 [gentoo-user] Questions about History file Tanstaafl
2014-01-08 14:01 ` Bruce Hill
2014-01-08 21:27   ` covici
2014-01-08 22:08   ` Stroller
2014-01-08 15:56 ` Alan McKinnon
2014-01-09 21:00   ` [gentoo-user] " James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox