Answers for "history with date time linux"

5

linux history with time

HISTTIMEFORMAT="%d/%m/%y %T "
 history
Posted by: Guest on September-11-2020
0

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        [email protected]
    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
....
Posted by: Guest on October-22-2021
0

how to check command history in linux with date and time

echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bash_profile
source ~/.bash_profile
Posted by: Guest on May-17-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language