Views 33084 Votes 0 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 해 준다.

?

  1. [android] 디바이스(시뮬레이터) hosts 파일 수정하기

    Date2013.04.23 CategoryDevelop Byhooni Views33714
    Read More
  2. [linux] 특정 문자열 포함된 파일 찾는 명령어

    Date2013.10.16 CategorySystem/OS Byhooni Views33084
    Read More
  3. [ios] 소소한 팁 (Rect,Point,Path,URL 등)

    Date2013.08.08 CategoryDevelop Byhooni Views32640
    Read More
  4. [sql] insert into select 사용하기

    Date2013.04.23 CategorySystem/OS Byhooni Views31854
    Read More
  5. [linux] 리눅스 파일시스템과 디렉토리 설명

    Date2013.04.23 CategorySystem/OS Byhooni Views29770
    Read More
  6. [c#] 웹문서 소스(html) 긁어오기

    Date2013.04.23 CategoryDevelop Byhooni Views26584
    Read More
  7. [linux] 리눅스, 유닉스 CPU 이용률 확인..

    Date2013.04.23 CategorySystem/OS Byhooni Views25883
    Read More
  8. [vb] 문자열에서 태그 제거함수 (Visual Basic)

    Date2013.04.23 CategoryDevelop Byhooni Views25597
    Read More
  9. [ios] UIView에서 상위 UIViewController 가져오기

    Date2013.09.27 CategoryDevelop Byhooni Views23436
    Read More
  10. [linux] 리눅스,유닉스 /proc/stat 파일 보는 법

    Date2013.04.23 CategorySystem/OS Byhooni Views20707
    Read More
  11. [java] 입출력 스트림 3부 (오브젝트)

    Date2013.04.23 CategoryDevelop Byhooni Views19891
    Read More
  12. [java] 입출력 스트림 1부 (문자)

    Date2013.04.23 CategoryDevelop Byhooni Views18154
    Read More
  13. [unix] 쉘 스크립트 예제 모음

    Date2003.04.23 CategoryDevelop Byhooni Views17975
    Read More
  14. [c] 64bit 머신에서 inet_ntoa() 사용시 Segment fault 대처 방법법

    Date2014.02.08 CategoryDevelop Byhooni Views17738
    Read More
  15. [c] 메시지큐(Message Queue) 설명.. (joinc)

    Date2013.04.23 CategoryDevelop Byhooni Views16988
    Read More
  16. [android] 안드로이드 어플 모음 ㅎㅎ

    Date2013.04.23 CategoryDevelop Byhooni Views16340
    Read More
Board Pagination Prev 1 2 3 4 5 6 Next
/ 6