포럼 회원으로 등록하신분만 다운로드가 가능합니다. 최대 업로드 가능한 용량은 20MB 입니다.

* / 는 최상위 디렉터리를 뜻함. 만약 찾고자 하는 디렉터리가 있다면 그걸로 대체

- 파일 이름에 foobar 가 들어간 파일 찾기
   find / -name "foobar" -print

- 특정 사용자(foobar) 소유의 파일을 찾기
   find / -user foobar -print | more

- 최근 하루동안에 변경된 파일을 찾기
   find / -ctime -1 -a -type f | xargs ls -l | more

- 오래된 파일(30일 이상 수정되지 않은 파일) 찾기
   find / -mtime +30 -print | more

- 최근 30일안에 접근하지 않은 파일과 디렉터리를 별도의 파일로 만들기
   find / ! ( -atime -30 -a ( -type d -o -type f ) ) | xargs ls -l > not_access.txt

- 하위 디렉터리로 내려가지 않고 현재 디렉터리에서만 검색하기
   find . -prune ...

- 퍼미션이 777 인 파일 찾기
   find / -perm 777 -print | xargs ls -l | more

- others 에게 쓰기(write) 권한이 있는 파일을 찾기
   find / -perm -2 -print | xargs ls -l | more

- others 에게 쓰기(write) 권한이 있는 파일을 찾아 쓰기 권한을 없애기
   find / -perm -2 -print | xargs chmod o-w
      또는
   find / -perm -2 -exec chmod o-w {} ; -print | xargs ls -l | more

- 사용자이름과 그룹이름이 없는 파일 찾기
   find / ( -nouser -o -nogroup ) -print | more

- 빈 파일(크기가 0 인 파일) 찾기
   find / -empty -print | more
      또는
   find / -size 0 -print | more

- 파일 크기가 100M 이상인 파일을 찾기
   find / -size +102400k -print | xargs ls -hl

- 디렉터리만 찾기?
   find . -type d ...

- root 권한으로 실행되는 파일 찾기
   find / ( -user root -a -perm +4000 ) -print | xargs ls -l | more

- 다른 파일시스템은 검색하지 않기
   find / -xdev ...

- 파일 이름에 공백이 들어간 파일 찾기
   find / -name "* *" -print

- 숨겨진(hidden) 파일을 찾기
   find / -name ".*" -print | more

- *.bak 파일을 찾아 지우기
   find / -name "*.bak" -exec rm -rf {} ;

- *.bak 파일을 찾아 특정 디렉터리로 옮기기
   mv `find . -name "*.bak"` /home/bak/

- 여러개의 파일에서 특정 문자열을 바꾸기
   find / -name "*.txt" -exec perl -pi -e 's/찾을문자열/바꿀문자열/g' {} ;

 

List of Articles
번호 제목 글쓴이 날짜sort 조회 수
53 The GNU Make - How to Using Make file 김재훈 2009-04-03 6064
52 The GNU Linker - How to Using ld file 김재훈 2009-04-03 6044
51 The GNU Binary Utilities - How to Using binutils file 김재훈 2009-04-03 6084
50 The GNU Assembler - How to Using AS file 김재훈 2009-04-03 6017
49 C Library ABI for the ARM®Architecture file 김재훈 2009-03-31 6077
48 ARM Developer Suiite (ADS) 메뉴얼 모음 file 김재훈 2009-03-31 7397
47 framebuffer capture하기 [1] 고현철 2009-03-30 6107
46 우분투 리눅스 8.10 네트워크 수동 설정 방법 [2] 김재훈 2009-03-23 6367
45 우분투 리눅스 8.10 업데이트 서버 변경 방법 김재훈 2009-03-23 6144
44 VirtualBox 설치 및 환경 설정 가이드 file 김재훈 2009-03-23 6271
43 SDL에서 touchscreen enable 시키는 방법 고현철 2009-03-04 6047
42 mp4 container file format 고현철 2009-02-24 7818
41 응용프로그램 컴파일 시 "config.h"가 없다고 나오는 경우 [1] 김재훈 2009-02-18 6137
40 QT-Embedded 4.4.3 컴파일 방법 [1] 김재훈 2009-02-17 8043
39 Linux 101 Hacks file [1] 유형목 2009-02-15 6107
38 POSIX Serial Programming Guide file 김재훈 2009-02-12 6075
37 ARM ADS Errors and Warning 코드 설명 file 김재훈 2009-02-12 6040
36 CVS 디렉터리 날리는 방법 김재훈 2009-02-12 6065
35 펌웨어 프로그래밍 팁 - gotoxy() 김재훈 2009-01-31 6116
34 펌웨어 프로그래밍 팁 - atox() 함수 구현 김재훈 2009-01-31 6209

사용자 로그인