파일만
find ./ -type f -exec chmod -v 644 {} \;
폴더만
find ./ -type d -exec chmod -v 755 {} \;
해당파일만
find ./ -type d -name 파일이름 -exec chmod -v 755 {} \;
해당파일을 제외하고
find ./ -type d \! -name 파일이름 -exec chmod -v 755 {} \;
해당폴더만
find ./ -type d -name 폴더이름 -exec chmod -v 755 {} \;
해당폴더를 제외하고
find ./ -type d \! -name 폴더이름 -exec chmod -v 755 {} \;
여기서 주의해야 할 사항은 {} 과 \ 사이에는 꼭 공백을 넣어야 합니다.
안그러면 아래와 같은 에러가 뜹니다.
find: missing argument to `-exec'
파일과 폴더를 모두 한꺼번에 변경 할 때는 아래와 같이 합니다.
chmod -R 755 *
해보지는 않았지만 chown 소유자명 변경도 잘 적용 될까나???
'리눅스 > 리눅스이용팁' 카테고리의 다른 글
리눅스 버전 확인 명령어 (0) | 2012.01.25 |
---|---|
YumRepo Error: All mirror URLs are not using ftp, http[s] or file. / Error: Cannot find a valid baseurl for repo: addons (0) | 2011.10.10 |
chmod 폴더만 or 파일만 권한변경하기 (0) | 2011.09.26 |
PHP 파일 업로드 용량 제한 :: 환경설정(php.ini & Apache) (0) | 2011.09.07 |
mount: you must specify the filesystem type (0) | 2011.09.07 |
리눅스 시간 맞추기 / 리눅스 시간 확인 (0) | 2011.08.24 |
댓글을 달아 주세요