Hi,
I am using Sun Solaris 5.9 OS. I have found a file called wtmpx having a size of 5.0 GB. I want to clear this file using :>/var/adm/wtmpx. My query is, would it cause any problem to the running live system.
Could anyone suggest the best method to clear the file without causing problem to the system.
Thanks & Regards,
P.C.Vijayakumar.
cat /dev/null > /var/adm/wtmpx
cat /dev/null > /var/adm/wtmp
Thanks,
would it cause any problem to the running system?
Reg
Vijay
This will work without executing cat.
> /var/adm/wtmpx
> /var/adm/wtmp
You may want to backup what you have since it may contain audit data.
I would suggest to compress the files when you do the backup.
ie:
gzip -c /var/adm/wtmpx >/my/backup/path/wtmpx.gz
gzip -c /var/adm/wtmp >/my/backup/path/wtmp.gz
I would suggest to rotate these files on a regular basis.
check the logadm utility. This might work for you.
logadm logadm (1m) - manage endlessly growing log files
Hi Friend,
Best way is to purge the file
> /var/adm/wtmpx
this command will not effect your system, but you will loss all the information of user who logged in your server before, and first check the permission of file what is that after purging file and befor purging file if it chaged due to some resion then system will not boot after reboot then you need to reboot m/c in sigle user mode and create these empty file with same permission
Thanks
Pravin Landge