1836584 Members
1656 Online
110102 Solutions
New Discussion

/var/adm/wtmps file

 
Robert Reed
Occasional Contributor

/var/adm/wtmps file

On 11.11 systems I can get the date and year from the wtmp file with the fwtmp command.
Neither fwtmp or who works on the wtmps file on 11.23 systems. The last command provides the date but not the year. It there a command that extracts the year also??
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: /var/adm/wtmps file

Hi Robert:

# /usr/sbin/acct/fwtmp < /var/adm/wtmp

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: /var/adm/wtmps file

YAQUB_1
Respected Contributor

Re: /var/adm/wtmps file

Hi,

U can see also below thread:-
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=943509

Thanks-Yaqub
I am a Customer Advocate!!!
Rasheed Tamton
Honored Contributor

Re: /var/adm/wtmps file

last command does not give you the year info. Even the command

/usr/sbin/acct/fwtmp < /var/adm/wtmps

does not clearly provide the WAY you WANT. May be there is a patch to fix this issue.

I do not have an old file which goes back more than a year. If you have, you may try like this:
/usr/sbin/acct/fwtmp < /var/adm/wtmps > /tmp/ltmp1

(redirecting the wtmps file to a filed ltmp1 in /tmp dir)

last -RX < /tmp/ltmp1

Also, you can check the -W option of who command (-W option is used to examine the /var/adm/wtmps file)

who -RuW |more