How
to get time of execution of any command in Unix/Linux
Simply
execute the following command on shell prompt and you will get date
and time execution of any command.
$
export HISTTIMEFORMAT='%F %T '
To make
it permanent edit the
To
display timezone:
$
export HISTTIMEFORMAT='%d-%b-%Y %r %Z'
$
history
351
08-Sep-2009 09:53:47 PM PDT ls -lrt
352
08-Sep-2009 09:53:49 PM PDT cd ..
To
display AM / PM: You
can use %r option
To
display in dd-MON-YY time format:
You can format it as you want %d-%b-%Y %r
No comments:
Post a Comment