public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: covici@ccs.covici.com
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Questions about History file
Date: Wed, 08 Jan 2014 16:27:19 -0500	[thread overview]
Message-ID: <31819.1389216439@ccs.covici.com> (raw)
In-Reply-To: <20140108140154.GX2988@server>

Bruce Hill <daddy@happypenguincomputers.com> wrote:

> 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.


Thanks, I thought history was always appended,but now I know.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici
         covici@ccs.covici.com


  reply	other threads:[~2014-01-08 21:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-01-08 22:08   ` Stroller
2014-01-08 15:56 ` Alan McKinnon
2014-01-09 21:00   ` [gentoo-user] " James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31819.1389216439@ccs.covici.com \
    --to=covici@ccs.covici.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox