1833800 Members
2506 Online
110063 Solutions
New Discussion

Zero out audit log file

 
SOLVED
Go to solution
B Wade Moll
Frequent Advisor

Zero out audit log file

I have a filesytem that is approaching 95% and there is an audit.log file that is filling up the space rapidly

rs6qdat752:/home/ldapqapl/idsslapd-ldapqapl/logs >#ls -l
total 473864
-rw-rw---- 1 ldapqapl ldapqapl 2078 Jul 21 19:04 adminaudit.log
-rw-rw---- 1 ldapqapl ldapqapl 219850361 Sep 15 14:16 audit.log
-rw------- 1 ldapqapl db2sqldp 1240 Jun 06 14:02 backup_ITDS.log
-rw-rw---- 1 ldapqapl ldapqapl 0 May 19 15:32 bulkload.log


I would like to zero out this log file, but keep the same permissions and inode. I can't recall the command to move the data (I want to make an audit.log.old file in /tmp) to do this.

Thank you !!
3 REPLIES 3
SKR_1
Trusted Contributor

Re: Zero out audit log file

Do

> audit.log

Thanks

SKR
SKR_1
Trusted Contributor
Solution

Re: Zero out audit log file

cp -p audit.log audit.log.old
> audit.log ( to null the file or trim the file )

Thanks

SKR
B Wade Moll
Frequent Advisor

Re: Zero out audit log file

thank you !!