Unix history with date and time
Hello Friends
I know that if we set the HISTTIMEFORMAT variable like HISTTIMEFORMAT="%d/%m/%y %T " Then we can see the time and date of the command execution but it apply only the commands fired after setting the variable what if we want to check the time and date of the commands fired before setting this variable can any one give any succession about it. Thanks Rahul Sharma |
You would need to set the format system-wide and restart the system for it to take effect. I'm not familiar with Fedora and do not know where basic environment variables are set (somewhere in /etc) system-wide. You could set the variable in /etc/profile and accomplish that -- every user would, on log in, would have that variable set.
History prior to setting the environment variable will not contain the time stamp; the history file resides in your home directory and is appended with each new command entered -- it's not in a data base somewhere. Hope this helps some. |
All times are GMT -5. The time now is 11:37 AM. |