deeejay

Bash - history command with timestamp

Aug 20th, 2015
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.58 KB | None | 0 0
  1. Execute export below, then execute history
  2.  
  3. history with timestamp
  4. ===
  5. i.e. 994  2008-10-16 02:27:40 exit
  6. export HISTTIMEFORMAT=”%F %T ”
  7.  
  8. i.e. 1051 : Wed 16 Jun 2010 08:27:30 PM IST : df -h
  9. export HISTTIMEFORMAT=”: %c : ”
  10.  
  11. i.e. day month time
  12. export HISTTIMEFORMAT=”%d %m %T ”
  13.  
  14. i.e. 458 Sat Sep 22 – 07:37:29 PM history
  15. export HISTTIMEFORMAT=”%a %h %d – %r ”
  16.  
  17. i.e. 460 Saturday Sep 22 – 07:39:54 PM history
  18. export HISTTIMEFORMAT=”%A %h %d – %r ”
  19.  
  20. i.e. 460 Saturday September 22 – 07:39:54 PM history
  21. export HISTTIMEFORMAT=”%A %B %d – %r ”
Advertisement
Add Comment
Please, Sign In to add comment