"Find"의 두 판 사이의 차이

ph
이동: 둘러보기, 검색
5번째 줄: 5번째 줄:
 
* 오늘 바뀐 파일 찾기
 
* 오늘 바뀐 파일 찾기
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
$ touch -t `date +%m%d0000` creteria
+
$ touch -t `date +%m%d0000` creteria find . -newer creteria -type f
$ find . -newer creteria -type f
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
* 찾아서 etags
 
* 찾아서 etags

2011년 7월 22일 (금) 14:22 판

  • 모든 실행파일 찾기

일단 file * | grep executable 이 제일 간단함. find명령으로는

find . -depth 1 -perm -u+x ! -type d

symbolic link까지 찾는다는게 문제. ! -type l 로 거를 수 있으나 ln의 source file이 executable일 수 있음.

  • 오늘 바뀐 파일 찾기
$ touch -t `date +%m%d0000` creteria ;  find . -newer creteria -type f
  • 찾아서 etags
 find . -name '*.cpp' -or -name '*.h' | xargs etags --append

emacs manual에는

find . -name "*.[chCH]" -print | etags -