LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-03-2018, 10:31 PM   #1
sub320
Member
 
Registered: Jan 2016
Posts: 116

Rep: Reputation: 3
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
 
Old 07-03-2018, 10:48 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does BASH history command have no history when run in script ? lump_of_lard Programming 4 01-30-2015 09:45 AM
[SOLVED] Deleting particular date's history command. Satyaveer Arya Linux - Software 11 12-07-2011 02:16 PM
History with date and executed file/command wetech3 Linux - Newbie 1 02-17-2011 08:04 AM
History command with system date shipon_97 Linux - Newbie 5 12-26-2009 02:41 AM
History command, How to get the date? philipina Linux - General 2 08-05-2004 05:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration