From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-user+bounces-153014-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BD1B6138247 for <garchives@archives.gentoo.org>; Wed, 8 Jan 2014 21:27:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 45BB2E0B43; Wed, 8 Jan 2014 21:27:22 +0000 (UTC) Received: from ccs.covici.com (ccs.covici.com [70.109.53.110]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 49885E0B2E for <gentoo-user@lists.gentoo.org>; Wed, 8 Jan 2014 21:27:20 +0000 (UTC) Received: from ccs.covici.com (localhost [127.0.0.1]) by ccs.covici.com (8.14.7/8.14.7) with ESMTP id s08LRJhv031820 for <gentoo-user@lists.gentoo.org>; Wed, 8 Jan 2014 16:27:19 -0500 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Questions about History file In-reply-to: <20140108140154.GX2988@server> References: <52CD4022.2090504@libertytrek.org> <20140108140154.GX2988@server> Comments: In-reply-to Bruce Hill <daddy@happypenguincomputers.com> message dated "Wed, 08 Jan 2014 08:01:54 -0600." X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.4.1 Date: Wed, 08 Jan 2014 16:27:19 -0500 Message-ID: <31819.1389216439@ccs.covici.com> From: covici@ccs.covici.com Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Archives-Salt: 12426af7-51e7-4b65-b661-ca302fe68aa0 X-Archives-Hash: 15f23a83209a30186640099db539a860 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