출처 : http://onlybible.tistory.com/1202
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
간단하네.
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
간단하네.
'OS > LINUX' 카테고리의 다른 글
[펌] vi 사용시 ^M 없애기 (0) | 2013.07.17 |
---|---|
[Solaris] Tree 구조로 디렉토리 조회하는.... (0) | 2013.03.11 |
[펌] Portsentry 설정방법 (0) | 2009.08.03 |
아파치 웹서버에서 디렉토리 보안 걸때, 주의 사항. (0) | 2009.07.17 |
Xming으로 Windows에서 Xwindow를 원격접속하기 (0) | 2009.03.25 |