Operating System - HP-UX
1834660 Members
2660 Online
110069 Solutions
New Discussion

History Variable - How to log all commands

 
Pablo Hidalgo
New Member

History Variable - How to log all commands

Hi. I'd like to know if it's possible to know, for a specific user, all the commands that have been executed. Though history variable , I am not sure about the results. If there are serveral connections or several csh's, how does .history file get updated????

What is the difference between history variable declared with set and setenv as well??
Thanks in advance,
Pablo
3 REPLIES 3
CHRIS_ANORUO
Honored Contributor

Re: History Variable - How to log all commands

Check the link. In the users .profile, include export ENV="$HOME/.cshrc"

Setup the shell variables:
export HISTFILE=~/.sh_history
export HISTSIZE=500

http://forums.itrc.hp.com:80/cm/QuestionAnswer/1,1150,0x3263dfe5920fd5118fef0090279cd0f9,00.html










http://forums.itrc.hp.com:80/cm/QuestionAnswer/1,1150,0x3263dfe5920fd5118fef0090279cd0f9,00.html
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Victor BERRIDGE
Honored Contributor

Re: History Variable - How to log all commands

Hi,
What do you call many connections? differents users using the same account from different location?
In that case you would have to include in .cshrc a way to recognize each account using theyr IP address or pts/tty to suffix your history file.

all the best

Victor
Pablo Hidalgo
New Member

Re: History Variable - How to log all commands

Is it possible to add to the .history file the date and time for every command??