grep
도 sed
도 가공 식품에 적합하지 않습니다. awk
도움이 될 수 있습니다 (불행히도 나는 그것을 모릅니다). 그러나 find
여기, 너무 편리 할 수 있습니다 :
이
-perm mode
File's permission bits are exactly mode (octal or symbolic).
Since an exact match is required, if you want to use this form
for symbolic modes, you may have to specify a rather complex
mode string. For example -perm g=w will only match files which
have mode 0020 (that is, ones for which group write permission
is the only permission set). It is more likely that you will
want to use the `/' or `-' forms, for example -perm -g=w, which
matches any file with group write permission. See the EXAMPLES
section for some illustrative examples.
-perm -mode
All of the permission bits mode are set for the file. Symbolic
modes are accepted in this form, and this is usually the way in
which would want to use them. You must specify `u', `g' or `o'
if you use a symbolic mode. See the EXAMPLES section for some
illustrative examples.
-perm /mode
Any of the permission bits mode are set for the file. Symbolic
modes are accepted in this form. You must specify `u', `g' or
`o' if you use a symbolic mode. See the EXAMPLES section for
some illustrative examples. If no permission bits in mode are
set, this test matches any file (the idea here is to be consis‐
tent with the behaviour of -perm -000).
그래서 당신을 위해 일할 수있는 것입니다 : 당신은 단지 파일 이름을 필요로하는 경우
find . -perm -755 -printf '%m %p\n'
는 그냥
-printf
부분을 제거합니다.
'755'는 실제로 비트 열을 나타내는 8 진수이므로 "보다 큼"이란 정확히 무엇을 의미합니까? 666은 모든 사람에게 쓰기 권한을 부여합니다. 그것이 "755"보다 더 큽니까? '755'는''666'보다 더 큽니까? –
OS X 사용자 :'stat -c '% a % n'*'(리눅스)는'stat -f '% Lp % N'*'' – mklement0
인 것처럼 보입니다. awk? – Soncire