리눅스 분류
find 명령어 질문 드립니다.
작성자 정보
- 딩가민 작성
- 작성일
컨텐츠 정보
- 2,139 조회
- 2 댓글
- 0 추천
- 목록
본문
---------- 1 root root 0 Jul 13 16:54 file1 (퍼미션 000)
---x------ 1 root root 0 Jul 13 16:54 file2 (퍼미션 100)
--w------- 1 root root 0 Jul 13 16:54 file3 (퍼미션 200)
--wx------ 1 root root 0 Jul 13 16:54 file4 (퍼미션 300)
-r-------- 1 root root 0 Jul 13 16:54 file5 (퍼미션 400)
-r-x------ 1 root root 0 Jul 13 16:54 file6 (퍼미션 500)
-rw------- 1 root root 0 Jul 13 16:54 file7 (퍼미션 600)
-rwx------ 1 root root 0 Jul 13 16:54 file8 (퍼미션 700)
현재 위와 같은 8개의 파일이 있는데요.
# find . -perm 600 -type f 라고 치면 당연히 file7만 검색이 되는게 맞습니다.
그런데
# find . -perm -600 -type f 라고 치면 file7, file8 이 검색이 됩니다.
그리고
# find . -perm +600 -type f 라고 치면 file3, file4, file5, file6, file7, file8 이 검색이 되는데
왜 그런지 차이점을 잘 모르겠습니다.
관련자료
-
이전
-
다음
댓글 2
chozzalinuxer님의 댓글
- chozzalinuxer
- 작성일
- 나 + 를 붙이지 말고 그냥 600이라고 줘보심이??
쭈운님의 댓글
- 쭈운
- 작성일
-perm 600 = 600 조건이 일치하는 파일만 검색
-perm -600 = rw (r and w) 가 포함된 모든 파일 검색 ( rw , rwx )
-perm +600 = r 이나 w가(r or w) 하나라도 포함된 파일 검색 ( r, w, rw, rwx, rx, wx), 0과 1만 제외
-perm -600 = rw (r and w) 가 포함된 모든 파일 검색 ( rw , rwx )
-perm +600 = r 이나 w가(r or w) 하나라도 포함된 파일 검색 ( r, w, rw, rwx, rx, wx), 0과 1만 제외