How can I keep Solaris 11 command history after the user logs out?

0

It seems that in Solaris 11 the command history is cleared every time user exits the shell.

Is there an option to keep history after the user logs out so that it will be available at next login?

Indika K

Posted 2011-08-15T11:58:05.463

Reputation: 177

Answers

3

History is a non OS dependent shell feature. Bash and ksh93 which are the most common login shells under Solaris 11 Express handle history a slightly different way.

Make sure the HISTFILE variable is set when ksh is invoked, or set before you exit the shell if you use bash. In both cases, make sure it points to a file you have permissions to write to.

jlliagre

Posted 2011-08-15T11:58:05.463

Reputation: 12 469