Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Mar 2002 16:46:10 -0500 (EST)
From:      Peter Leftwich <Hostmaster@Video2Video.Com>
To:        "Gary W. Swearingen" <swear@blarg.net>
Cc:        Joe & Fhe Barbish <barbish@a1poweruser.com>, FreeBSD Questions <FreeBSD-Questions@FreeBSD.Org>
Subject:   Re: command history for user accounts [tcsh promotion]
Message-ID:  <20020324164045.H50035-100000@earl-grey.cloud9.net>
In-Reply-To: <7mit7m5l6w.t7m@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
On 24 Mar 2002, Gary W. Swearingen wrote:
> "Joe & Fhe Barbish" <barbish@a1poweruser.com> writes:
> > My regular users created with adduser do not have any command history like my root has. I am using the default sh shell.  I have command on the root account.
> All shells have history, probably enabled by shell default.  Determine which shell your users are getting by default (/etc/adduser.conf, or better, /etc/passwd) and check the man page for the history-controlling environmental variables and "set" commands.  Then investigate how the users have these set and maybe how they got set (shell startup scripts). Some scripts come from "/usr/share/skel/", others are in /etc/.

I use tcsh for my shell and in my ~/.cshrc (or you can use ~/.tcshrc, which
is sourced at login, or may be manually sourced by typing `source ~/.cshrc
if you make changes to it) I have:

set history = 1000
set savehist = 1000
set histfile = ~/.history

This way, I can type `history | less -e` at my prompt and see command
number, HH:MM, and command.  If anyone knows how I can configure this
command to be more verbose and include day/date, please POST how.

The tcsh shell stores this information in a file I've set as ~/.history
which can be backed up to an archive or copied to a folder for later
perusal.  Each command, however, is preceded by an odd code that seems to
be the command number and time wrapped up in long integer.

--
Peter Leftwich
President & Founder
Video2Video Services
Box 13692, La Jolla, CA, 92039 USA
+1-413-403-9555


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020324164045.H50035-100000>