tmpwatch 라는 명령
1. 이런 파일이 있다.
[root@testguk guk]# ll
합계 424
-rw-r--r-- 1 root root 10 9월 23 15:40 1.txt
-rw-r--r-- 1 root root 357961 9월 18 17:31 1221626338-metabbs-0.11.tar.tar
-rw------- 1 root root 1052 9월 17 02:41 anaconda-ks.cfg
-rw-r--r-- 1 root root 104 9월 22 18:37 array_pop.php
-rw-r--r-- 1 root root 82 9월 22 18:40 array_push.php
-rw-r--r-- 1 root root 106 9월 23 14:19 array_shift.php
-rw-r--r-- 1 root root 210 9월 23 14:33 array_unique.php
-rw-r--r-- 1 root root 96 9월 23 14:23 array_unshift.php
-rw-r--r-- 1 root root 344 9월 19 16:21 asort.php
-rw-r--r-- 1 root root 13333 9월 17 02:41 install.log
-rw-r--r-- 1 root root 2551 9월 17 02:41 install.log.syslog
-rw-r--r-- 1 root root 148 9월 19 16:06 ksort.php
-rw-r--r-- 1 root root 63 9월 22 18:32 rsort.php
-rw-r--r-- 1 root root 200 9월 19 15:33 shuffle.php
-rw-r--r-- 1 root root 298 9월 19 15:48 sort.php
2. 24시간 이후로 접근이 없는 파일들 삭제
[root@testguk guk]# tmpwatch --atime 24 ./
[root@testguk guk]# ll
합계 28
-rw-r--r-- 1 root root 10 9월 23 15:40 1.txt
-rw-r--r-- 1 root root 104 9월 22 18:37 array_pop.php
-rw-r--r-- 1 root root 82 9월 22 18:40 array_push.php
-rw-r--r-- 1 root root 106 9월 23 14:19 array_shift.php
-rw-r--r-- 1 root root 210 9월 23 14:33 array_unique.php
-rw-r--r-- 1 root root 96 9월 23 14:23 array_unshift.php
-rw-r--r-- 1 root root 63 9월 22 18:32 rsort.php
간단하네.
'서버관리' 카테고리의 다른 글
| 새로운 DoS 공격 PDoS “Phlashing” [ok] (0) | 2008/09/24 |
|---|---|
| sendmail spfmilter를 통한 스팸 방지 [ok] (2) | 2008/09/23 |
| 일정 시간동안 접근이 없는 파일 삭제하기 [ok] (0) | 2008/09/23 |
| 파일 시스템 없이 디스크 엑세스 하기 [ok] (0) | 2008/09/23 |
| 파일시스템 일반적 구조 [ok] (0) | 2008/09/23 |
| SCSI disk error : host 0 channel 0 id 0 lun 0 return code = 10000 [solved] (0) | 2008/09/23 |
Comment 0



