Sorry, I deleted my previous post. On OS X the default behaviour of Bash is to store the epoch in the history file for each command run, which you can then use HISTTIMEFORMAT to format the output timestamp when using the history command. On Linux (RHEL) this is not the default and I can't quite find where to set it. But if it's not set already, you have no chance of getting the information you want from that time period.
If you see something like the following (#<number), you might be OK, providing your HISTSIZE is long enough and no one has truncated the history file since the date you want:
i try to set linux date & time in specific format but it keep giving me error
Example :
date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
or
date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
keep giving me this error :
date: invalid date ‘19-01-2017 00:05:01'
Please use CODE tags... (7 Replies)
hi, i have an AIX6.1 machine and i modified a user's profile so that it creates history file for each ip address that connects with this user. the reason i did this is because more than 1 person connects with the same user so i want to keep track of command run by all of them. therefore, in the... (5 Replies)
Hello All,
I was wondering if anyone knew of a way to find out what commands were run on a specific date.
I'm looking to see if I can find certain commands that were run on 3/4, today is 3/10...?
Any thoughts or ideas would be much appreciated!
Thanks in Advance,
Matt
----------... (3 Replies)
Hi,
Can we display the Date/time stamp in history command
Ex:
$history
output
-----------
vi pr.sh
ksh -x pr.sh
ksh -n pr.sh
nhoup ksh pr.sh &
nohup ksh pr.sh &
i want the output like this
Tue Mar 14 17:18:57 GMT 2006 vi pr.sh HOSTNAME
is it possible sir ???? (3 Replies)
Hi,
I can use history command in unix to view my last 50 commands. But how can I run the previous commands easily? Can history command help?
Firebird (2 Replies)