Contents

Views 30725 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
142 System/OS [linux] 콘솔/Xwindow 에서 PC스피커 소리 없애기 hooni 2003.04.23 16425
141 System/OS [linux] 패킷 스니퍼링 hooni 2003.04.23 16391
140 System/OS [windows] 원격 데스크탑(터미널 서비스) 포트 변경 hooni 2013.04.23 16363
139 System/OS [owasp] 10대 웹어플리케이션 보안 취약 file hooni 2013.04.23 16001
138 System/OS 라우팅 경로 결정 영향 요소 ㅋㅋ file hooni 2013.04.23 15949
137 System/OS [router] 설정과 기본 명령어들 모음 hooni 2013.04.23 15757
136 System/OS [linux] 쉘스크립트 expr hooni 2014.03.11 15722
135 System/OS [linux] 종료와 종료코드 확인(환경변수에서) hooni 2003.04.23 15625
134 System/OS [linux] 특수문자 환경 설정(stty) hooni 2003.04.23 15352
133 System/OS [linux] apache, php, jsp 환경설정하기.. hooni 2003.04.23 15318
132 System/OS [linux] 센드메일 동적릴레이 설치 hooni 2003.04.23 15302
131 System/OS [linux] 아파치설치/설정 - 사용인증 hooni 2003.04.23 15152
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17