Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

last command

Status
Not open for further replies.

ronron

Technical User
Jun 21, 2002
3
0
0
US
does anybody know how to clear out lists after issuing the "last" command? i want to re-start it and start from scratch or zero.

how about showing the complete date (including year)?
 
I'm too sure if there is an option to empty wtmp, but you should be able to empty it by issuing.

> /etc/wtmp





Nadim
 
We usually just simply delete the wtmp file (rm /var/wtmp) and it starts over at that point. Works for us...
 
ron,

try fwtmp command, get the syntax from man, clear wtmp to a save file for any archive purpose.

hope this will work.

Farhsyed
 
to capture the data to archive it use who -a /var/adm/wtmp and redirect the output to a save file

like this
from root

who -a /var/adm/wtmp > don
now you can clear it by using cat /dev/null > /var/adm/wtmp

hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top