Service Desk Practitioners Forum
cancel

Get the date, time and user with history command

Highlighted
Damián Sarmient
New Member.

Get the date, time and user with history command

Hi.

I've been searching for a while now and haven't been able to find any leads on how to get the date, time and user when I type the history command.

I used the HISTTIMEFORMAT command but it wasn´t successful. I guess the HISTTIMEFORMAT command is only for bash and I have sh shell, so is there any equivalent command for Unix O.S. in sh shell?

# export HISTTIMEFORMAT='%F %T '
# history | more
205 bdf
206 resize
#

My OS is HP-UX B.11.31 U ia64.

Regards.
3 REPLIES
The Pike
Acclaimed Contributor.

Re: Get the date, time and user with history command

You might have posted in the wrong forum.
Is this related to Service Desk in any way?
Damián Sarmient
New Member.

Re: Get the date, time and user with history command

Hi 'The Pike'

I only want to monitor what the users do in the system.
As you can see, the history command only displays the command that has been executed, but it doesn´t display the time and the date.
Anyway, I found a tool developed by HP. It is "audisp".

Until now it is the only way I can know what the users are doing in the system.

Regards.

[DASM]
The Pike
Acclaimed Contributor.

Re: Get the date, time and user with history command

That doesn't really answer my question.