General discussion

Locked

Best way to shrink /var/adm/wtmpx

By SciFiMan ·
What is the polite way to periodically cut down the size of /var/adm/wtmp and wtmpx? On AIX it was just an ascii file and I could throw /dev/null at it, but on Solaris it's formatted. If I remove it and recreate the file with touch, would that work?

Thanks,
David

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Best way to shrink /var/adm/wtmpx

by ken.cunningham In reply to Best way to shrink /var/a ...

David. Just tried removing and recreating wtmp on one of our redundant boxes and it doesn't appear to cause a problem. Just ensure that permissions/ownerships are preserved. Hope this helps.

Collapse -

Best way to shrink /var/adm/wtmpx

by SciFiMan In reply to Best way to shrink /var/a ...

That did work, thanks Ken!

Regards,
David

Collapse -

Best way to shrink /var/adm/wtmpx

by insatiable In reply to Best way to shrink /var/a ...

I use this script from a Unix Guru daily tip. The script will zero out a .log file. I keep it in my directory and just change the log file.

for object in /var/adm/wtmp.log
do
> $object
print "$object has been zeroed!"
done

Good luck!Melissa

Collapse -

Best way to shrink /var/adm/wtmpx

by SciFiMan In reply to Best way to shrink /var/a ...

Thanks, Melissa, I'll set this up also.

Regards,
David

Collapse -

Best way to shrink /var/adm/wtmpx

by SciFiMan In reply to Best way to shrink /var/a ...

This question was closed by the author

Back to Linux Forum
5 total posts (Page 1 of 1)  

Related Forums