"Find"의 두 판 사이의 차이
ph
3번째 줄: | 3번째 줄: | ||
find . -depth 1 -perm -u+x ! -type d | find . -depth 1 -perm -u+x ! -type d | ||
symbolic link까지 찾는다는게 문제. ! -type l 로 거를 수 있으나 ln의 source file이 executable일 수 있음. | symbolic link까지 찾는다는게 문제. ! -type l 로 거를 수 있으나 ln의 source file이 executable일 수 있음. | ||
+ | |||
* 오늘 바뀐 파일 찾기 | * 오늘 바뀐 파일 찾기 | ||
8번째 줄: | 9번째 줄: | ||
$ touch -t `date +%m%d0000` creteria ; find . -newer creteria -type f | $ touch -t `date +%m%d0000` creteria ; find . -newer creteria -type f | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
* 찾아서 etags | * 찾아서 etags | ||
13번째 줄: | 15번째 줄: | ||
[http://www.gnu.org/software/libtool/manual/emacs/Create-Tags-Table.html#Create-Tags-Table emacs manual]에는 | [http://www.gnu.org/software/libtool/manual/emacs/Create-Tags-Table.html#Create-Tags-Table emacs manual]에는 | ||
find . -name "*.[chCH]" -print | etags - | find . -name "*.[chCH]" -print | etags - | ||
+ | |||
* find symbolic link files those are not containing 'external' string in their full path. | * find symbolic link files those are not containing 'external' string in their full path. |
2011년 8월 23일 (화) 16:02 판
- 모든 실행파일 찾기
일단 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
find . -name "*.[chCH]" -print | etags -
- find symbolic link files those are not containing 'external' string in their full path.
find . -wholename '*external*' -prune -o -type l -exec ls -l '{}' \;