Contents

Views 33084 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
만약 특정 디렉토리 이하에서 network 라는 문자열을 포함한 파일을 찾고싶다면.. 해당 디렉토리에서 모든 파일을 읽어 찾아보아야 하나.. 다음과 같이 find 와 grep 를 파이프로 연결하여 사용하면 쉽게 찾을 수있다. 

# /etc/ 디렉토리 하위에서 'network' 문자열이 포함된 파일 찾기
find /etc/ -type f -exec grep 'network' {} /dev/null \;

# /etc/ 디렉토리 하위의 파일명 '*.conf' 중에서 'network' 문자열이 포함된 파일 찾기
find /etc/ -name '*.conf' -type f -exec grep 'network' {} /dev/null \;


위와 같이 명령어를 타입하면 /etc/ 디렉토리 이하에서 network 라는 문자열을 포함한 모든 파일명과 위치를 listing 해 준다. 


그리고 단순히 특정 단어를 포함한 파일명을 찾고 싶으면 locste 라는 것을 쓰면 된다.
즉, locate ftp 를 하면 ftp 라는 파일명이 포함된 파일들을 listing 해 준다.


?

List of Articles
No. Category Subject Author Date Views
325 System/OS [linux] 이기종간의 파일 공유(Samba) hooni 2003.04.23 15953
324 Develop [linux] 임베디드 리눅스 (embedded linux) file hooni 2013.04.23 8262
323 System/OS [linux] 종료와 종료코드 확인(환경변수에서) hooni 2003.04.23 16903
322 System/OS [linux] 처음 설치부터 APM 설치까지 (업데이트 할 것) hooni 2013.04.23 39455
321 System/OS [linux] 초간단 Postfix, Covecot, SSL/TLS (SMTP) file hooni 2017.12.11 12348
320 System/OS [linux] 초간단 SquirrelMail 설치/설정 (다람쥐 메일) hooni 2017.12.11 6066
319 System/OS [linux] 최소한의 커널 설정(커널설치 전체과정) hooni 2003.04.23 18302
318 System/OS [linux] 커널 컴파일, 설정 hooni 2003.04.23 18626
317 System/OS [linux] 콘솔 기본언어 설정 방법 hooni 2013.04.23 13849
316 System/OS [linux] 콘솔/Xwindow 에서 PC스피커 소리 없애기 hooni 2003.04.23 17505
315 System/OS [linux] 터미널에서 문자 깨질 때 설정 ㅋㅋ hooni 2003.04.23 14611
314 System/OS [linux] 텔넷, FTP 텍스트 모드에서 사용 hooni 2003.04.23 12706
Board Pagination Prev 1 ... 67 68 69 70 71 72 73 74 75 76 ... 99 Next
/ 99