History command with timestamp


 
Thread Tools Search this Thread
Operating Systems HP-UX History command with timestamp
# 1  
Old 04-16-2013
History command with timestamp

Hi, i want to print timestamp of the command along with output of 'history' command.
Tried this
Code:
export HISTTIMEFORMAT='%F %T'

. But it did not work still getting history output in general way (line number and command). I'm using
Code:
 HP-UX B.11.23 U ia64.

Requesting help in this regard. Thanks.

Last edited by jim mcnamara; 04-16-2013 at 11:07 AM..
# 2  
Old 04-16-2013
Log out and log back in, set the HISTTIMEFORMAT again, and you're there.
# 3  
Old 04-23-2013
Hi thank u for the help. sorry i was out of town. I first checked the .profile file and there was no parameter set for HISTTIMEFORMAT. since it's a production server, i'm a bit hesitant to do that. i'm in a fix!!!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

History command

Hi, I would like to know commands which i have executed on terminal should not be present in the history.How can i approch please help me. Regards, Mastan (1 Reply)
Discussion started by: mastansaheb
1 Replies

2. UNIX for Dummies Questions & Answers

The history command: See other users command history

Can anyone tell this: If two users are logged into the same server from different locations. Is there a way to see the history command of the other user? I tried the history command, but it is showing me only the commands I used. Thanks in advance for your help. Iamnew2solaris (1 Reply)
Discussion started by: iamnew2solaris
1 Replies

3. UNIX for Advanced & Expert Users

history timestamp in Solaris

Anyone knows how to display timestamp in Solaris since "HISTIMEFORMAT" variable is not supported in ksh ? (2 Replies)
Discussion started by: linuxgeek
2 Replies

4. Linux

history timestamp is messed up

Hi, Just wanted to know if anyone else has noted that the time-stamp in the history is all out of whack.:eek: I've Ubuntu, all patched, and when I ran history, it showed me commands that I ran few weeks ago with today's date. Is this normal? Here is a snippet: .... 85 2010-06-09 09:03:31... (6 Replies)
Discussion started by: nitin
6 Replies

5. UNIX for Dummies Questions & Answers

vi command history

How do you look at the whole list of previous commands you have used in VI? I know you can use the up and down arrows, but I know there's a way to see the full list. (5 Replies)
Discussion started by: cokedude
5 Replies

6. Filesystems, Disks and Memory

History command

I am working on solaris and audit is not configured on server. I get last commands used on server by HISTORY command, but I want some extra information like by which user command fired & by which host id Because same time we have many people use one login & fire commands & want History command... (2 Replies)
Discussion started by: akash_wagh
2 Replies

7. Shell Programming and Scripting

History Command

Hi all experts, I want to see all the command that is typed in the server 3 days ago. I typed HISTORY command but it does not show all the things. The reason is my senior DBA could see all the commands ran in the server 3 days ago but i cannot see. Please let me know is there anyway i can view... (6 Replies)
Discussion started by: ma466
6 Replies

8. Shell Programming and Scripting

need help in history Command

in my system history command is set to 60 how to remove all the command status even if i give history command. i mean: if i give history command in unix it should not show anything.........how to achieve this (2 Replies)
Discussion started by: ali560045
2 Replies

9. UNIX for Dummies Questions & Answers

Command history

Hello everyone, I am aware about the history command we use in bash. Just had a question regarding the history of commands. Is there any way i can limit my commands to be remembered or is there any way to delete the commands used by myself? Thank you (8 Replies)
Discussion started by: a25khan
8 Replies

10. UNIX for Dummies Questions & Answers

History Command

Hi I am using ksh shell, and I am unable to use the command !n (where n is the number in the history list). Please help me... :confused: (2 Replies)
Discussion started by: jack
2 Replies
Login or Register to Ask a Question