LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to know the date run the command in history (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-know-the-date-run-the-command-in-history-4175633229/)

sub320 07-03-2018 10:31 PM

how to know the date run the command in history
 
I use RHEL 7. when use the command "history" , it shows all command have used before , but do not have the date have run it .

Would advise how to know the date ?

thanks

rknichols 07-03-2018 10:48 PM

The date and time are not, by default, saved in the command history. You would have to set the HISTTIMEFORMAT shell variable to specify how the time stamp should be stored.


All times are GMT -5. The time now is 11:35 AM.