Find multiple command
Ex) repo sync가 안될 때, 매 .git의 이전 디렉토리로 이동하여 git 명령어 실행
find . -name ".git" -type d -exec sh -c "cd {}; cd .. ; git config core.filemode false" \;
Ex2) 특정 keyword가 포함된 파일 찾기 : grep에 "-l" 옵션 사용
find . -exec grep -l "vol.Events" {} \;
https://stackoverflow.com/questions/6336481/how-to-find-exec-cd-in-linux-unix
'linux' 카테고리의 다른 글
linux serial port (tty) 생존 확인 (0) | 2019.06.12 |
---|---|
linux에서 USB port 확인 방법 (0) | 2019.06.12 |
dd 명령어에 대한 고찰 (0) | 2019.03.27 |
RAID의 종류 (0) | 2019.03.04 |
how to git branch merge (0) | 2019.01.25 |