[svlug] To get history across telnet session

Joseph Yetter joey_e_y_jr at yahoo.com
Fri Jan 18 22:33:02 PST 2002


Erik,

What I think you are asking, is, once you have
logged in, to be able to see the last <some-number>
of commands that were entered in the previous
login session.  Whether the session was telnet,
or local terminal, or Xterm doesn't matter, although
multiple simultaneous sessions can cause the
history to become weird (YMMV).

If this is the question, then the answer depends
upon your login shell (usually set in /etc/passwd,
or with commands or GUIs).

if csh or tcsh:
  in .login or .cshrc, do:
      set history = 100
      set savehist = 20
  This will cause you to be able to look at your
  last 100 commands during a session.  The last
  20 commands will be saved when you logout, and
  they will be available once you re-login.

if using bash:
  These are set by default (verified on RH7.0)
    HISTSIZE=500
    HISTFILESIZE=500
    HISTFILE=~/.bash_history
  THis keeps the last 500 available across sessions.

if using sh:
   Sorry, no mechanism in Bourne Shell

if using ksh:
   I seem to remember something, but I don't have
   access to a system at the moment to verify.

cheers
-joe
Joe Yetter


> -----Original Message-----
> From: svlug-admin at lists.svlug.org 
> [mailto:svlug-admin at lists.svlug.org]On
> Behalf Of Erik Steffl
> Sent: Thursday, January 17, 2002 11:18 PM
> To: 'svlug at lists.svlug.org'
> Subject: Re: [svlug] To get history across telnet session
> 
> 
> Yi Zhang wrote:
> > 
> > >
> > >
> > >               I was trying to have history logged all the 
> commands,
> > > including telnet sessions
> > >               from another machine in the same LAN. How 
> can I do this?
> > > what env variable to set?
> 
>   nobody replied... I guess you have to rephraze the 
> question. I am not
> sure what you're asking...
> 
> 	erik
> 
> 




More information about the svlug mailing list