10일 이상된 파일 삭제
sudo find . -ctime +10 -exec rm -f {} \;
하위디렉토리에 다수의 파일 찾아 삭제하기
$ find /DIR -name '*c' -type f|xargs rm
*c 를 찾아 삭제한다.
하위디렉토리에 다수의 파일 찾아 바꾸기
$ find . -type f -name '*.jpg' -exec rename 's/\.jpg/\.JPG/' '{}' \;
jpg => JPG
확장자가 소문자로된 것을 대문자로 변경한다.
REF
https://man7.org/linux/man-pages/man1/find.1.html
https://recipes4dev.tistory.com/156
https://www.lesstif.com/lpt/linux-find-43844055.html
반응형
'LINUX' 카테고리의 다른 글
ln 디렉토리 링크 걸기 (0) | 2008.09.24 |
---|---|
리눅스 특정 단어 찾기 find grep (0) | 2008.09.10 |
ssh Secure Shell 파일 업로드시 에러 (0) | 2008.09.09 |
.bashrc (0) | 2008.08.06 |
ubuntu 7.10 vim sytax highlighting 안된다 (0) | 2008.06.26 |