Hi,
Is there anyway to print contents of any file ( say log files that grow automatically) within some timeframe ( comparing with current time), say
print contents of the added in:
1) last 2 hr
2) last 45 min
3) last 3 hrs 47 min
Hi,
Is there anyway to print contents of any file ( say log files that grow automatically) within some timeframe ( comparing with current time), say
print contents of the added in:
1) last 2 hr
2) last 45 min
3) last 3 hrs 47 min
Do the log entries have a timestamp?
Hi,
time stamp format is:
2009-02-28 21:55:01
Well, there you are. Just compare the current datetime with that value converted to a datetime, and there you go.
What languages do you know? Bash script, korn shell script, Perl, Python? Whichever you use, a one-second Google search will tell you how to convert a string to a datetime, and another one-second Google search will tell you how to compare two datetimes.