Operating System - HP-UX
1838765 Members
3482 Online
110129 Solutions
New Discussion

How to delete some records from 'last' command output?

 
SOLVED
Go to solution
David Shao
Advisor

How to delete some records from 'last' command output?

I want to hide some login information.
David Shao
1 REPLY 1
Michael Tully
Honored Contributor
Solution

Re: How to delete some records from 'last' command output?

Hi,

Although this should not be done, here is how.

#/usr/sbin/acct/fwtmp < /var/adm/wtmp > /tmp/file
then you can either edit the file or read it.

Then you can convert it back to binary form:
#/usr/sbin/acct/fwtmp -ic < /tmp/file > /var/adm/wtmp

See the man page for 'fwtmp' for a full explanation.

Regards
Michael



Anyone for a Mutiny ?