المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Ask for command in redhat linux to see logs date



msazzam
11-01-2009, 09:44
Dearr all

I have access to login with system that shows more logs .

as we know <cat> command it if for show all the logs lines .
my question is to do command to see all the logs with time .
for example :
I want to see logs from 03:00:00 to 10:00:00 .
the command I use to see the normal log is :
cat catrx*/HCA/20081220
so where can I add the new command to see the time for logs between period time .

UNIXY
11-01-2009, 19:43
last -t YYYYMMDDHHMMSS

YYYY = السنة
MM = الشهر
DD = اليوم
HH = الساعه
MM = الدقائق
SS = ثواني

مثال لعرض لعرض من قام بتسجيل الدخول في تاريخ 2009 , 2 يناير, الساعة 44;00;12
يكون الأمر:

last -t 20090102120044

msazzam
12-01-2009, 08:30
Dear Sir ..
I think you are professional and I hope to undersatnd what I need exactly ?Suppose you have system create logs every mille seconds .and you need to see all the logs from 3 am to 8 am ?
I mean all the logs in this two times?not all the logs in that time .

please if you can help .
thanks .

UNIXY
13-01-2009, 11:17
I can't think of any command that does what you want, maybe you should consider writing a shell script that does it for you
btw its impossible to just orint out who logged in spicific time without choosing year, month, day and hour

other wise you might wanna digg up some more in the manual pages
I'm sorry can't help

Peace out

msazzam
15-01-2009, 11:13
ok .. i think u r true ,that is only the solution to my status ,and I should create script to see the logs between two times .
anyway thanks for ur concern and help .