Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Retrieve Linux command line history by date

[qweet@superbox ~]$ export HISTTIMEFORMAT='%F %t '
[qweet@superbox ~]$ history
    1  2012-03-06        su -
    2  2012-03-06        jbach@mobiletribe.net
    3  2012-03-06        mysql
    4  2012-03-06        ll
    5  2012-03-06        cd /opt/
    6  2012-03-06        ll
    7  2012-03-06        exit
    8  2012-03-06        ll
    9  2012-03-06        ls -lsa
   10  2012-03-06        cd ../
   11  2012-03-06        ll
   12  2012-03-06        ll
....
Source by superuser.com #
 
PREVIOUS NEXT
Tagged: #Retrieve #Linux #command #line #history #date
ADD COMMENT
Topic
Name
2+4 =