- [root@localhost audit]# ll
- 总用量 14788
- -rw------- 1 root root 4632650 10月 19 09:12 audit.log
- -r-------- 1 root root 5243056 10月 16 18:32 audit.log.1
- -r-------- 1 root root 5242984 10月 13 19:33 audit.log.2
- [root@localhost audit]# find . -mtime +7 -exec rm -rf {} \;
- [root@localhost audit]# ll
- 总用量 14788
- -rw------- 1 root root 4632650 10月 19 09:12 audit.log
- -r-------- 1 root root 5243056 10月 16 18:32 audit.log.1
- -r-------- 1 root root 5242984 10月 13 19:33 audit.log.2
- [root@localhost audit]# find . -mtime +4 -exec rm -rf {} \;
- [root@localhost audit]# ll
- 总用量 9660
- -rw------- 1 root root 4632650 10月 19 09:12 audit.log
- -r-------- 1 root root 5243056 10月 16 18:32 audit.log.1
- [root@localhost audit]#