Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Mar 2017 02:45:08 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Ernie Luzar <luzar722@gmail.com>
Cc:        FreeBSD questions <freebsd-questions@freebsd.org>
Subject:   Re: command history & multiple root vt sessions
Message-ID:  <20170330024508.63a563c9.freebsd@edvax.de>
In-Reply-To: <58DBD448.6020805@gmail.com>
References:  <58DBD448.6020805@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 29 Mar 2017 11:35:36 -0400, Ernie Luzar wrote:
> I am at the keyboard that is wired to the computer.
> Using the Fx keys I logon as root in 3 different vt sessions.
> In each one issuing the "history" command shows a different set of 
> commands unique to that vt session. This is normal behavior.
> 
> How can this be? There is only a single /root directory on the host 
> system. All 3 vt sessions should be using the same .history file.

The shell usually reads history from memory, so the different
VT sessions use different histories while running.



> If I issue the "exit" command from the vt3 it should have updated the 
> /root/.history file with its session history content.

I had the same problem with user shell sessions inside X terminals.
This is what I added to /etc/csh.cshrc for global effect:

	set history = 200000
	set savehist = (200000 merge)

Maybe this also works for you?




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170330024508.63a563c9.freebsd>