Operating System - Linux
1819681 Members
3567 Online
109605 Solutions
New Discussion юеВ

how to see the log of /var/log/lastlog

 
SOLVED
Go to solution

how to see the log of /var/log/lastlog

it is big but can not "more" it, of course it must not be "last", for last is for wtmp.

then, how to check the log of /var/log/lastlog?

fredeirck
frederick
3 REPLIES 3
Ceesjan van Hattum
Esteemed Contributor

Re: how to see the log of /var/log/lastlog

what about 'tail':
tail -50 /var/log/lostlog will give you the last 50 lines.
Or 'tail -f [file]' will follow the output.

I hope this is what you are looking for...

Regards,
Ceesjan
John-Thomas Gaietto
Trusted Contributor
Solution

Re: how to see the log of /var/log/lastlog

Fredeirck,
You could use strings /var/log/lastlog | more you should be able to see the file now. Hope this helps.

Ackermann_1
Occasional Advisor

Re: how to see the log of /var/log/lastlog

Hi,

how about /usr/bin/lastlog ?
This should dump the information
from /var/log/lastlog in human readable form.
(At least under RedHat 7.x it is part of the distribution.)

Syntax:
lastlog [-u login-name] [-t days]

if you want to get rid of those 'Never logged in' entrys try

lastlog | sed -e '/Never logged in/d'

btw. if you are looking for some help topics, try
apropos

somtimes you have to update the whatis database with
makewhatis
before using apropos.

Hope this helps.
Please type slowly, I am German. ;)