command history

Dear all,

I am using solaris 6 O.S. and root previlege.I want to know how to get history of commands given by diff. users logged into the server.
I know that history command gives the list of previous commands for that particular log in session. In the simillar manner can I get simillar history for other users logged into the system without "whodo" command.

Thanks in advance

I can't speak directly for Solaris, but in HP-UX (my primary OS) each login of a user appends to a .sh_history file in the users home directory that contains all the commands a user last executed. (note that it is a hidden file). It doesn't have timestamps or anything, just a flat listing of commands ..

Give it a try, its worth a shot ... :stuck_out_tongue:

It depends on what shell they are using for instance in bash, the file is in their home directory, named .bash_history

Shimb0

It really depends on the shell a particular user is using.

bash and ksh are a couple which do save command history to a file.

Here's some examples of some other shells and where they can store their history data:

sh: (no history function available)
ksh: ~/.sh-history
csh: ~/.history (if it doesn't exist, csh keeps history in memory only. See man pages for csh(1) for more information)