Add Timestamp to history
$ export HISTTIMEFORMAT="%F %T "
History usually only gives the command number and the command. This
will add a timestamp to the history file.
Note: This will only put the correct timestamp on commands used after
the export is done. You may want to put this in your .bashrc
This is sample output :
759 2010-08-24 21:42:14 ls -lct /etc | tail -1 | awk '{print $6, $7, $8}'
760 2010-08-24 23:11:25 history
761 2010-08-24 23:11:29 export HISTTIMEFORMAT="%F %T "
762 2010-08-24 23:11:32 history
--
Regards,
Tha.Suresh
http://thasulinux.wordpress.com
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc