#author("2018-02-23T15:16:24+09:00","default:kow","kow")
*find パーミッションで検索 [#h229104f]
~
- ''syntax:''
~
&color(red,){'' find 検索Path -perm パーミッション ''};~
&color(red,){'' find 検索Path -対象者=アクセス権 ''};~
~
&color(red,){'' find ./ -perm 755 ''};~
&color(red,){'' find ./ -perm -u=x ''};~
&color(red,){'' find ./ -perm -u=w -exec mv {} ./backup \; ''};~
~
~
- ''comment:''~
検索Path以下のpermで指定された物を検索する~
~
permの指定は以下のものが使用可能~
'u'----owner~
'g'----group~
'a'----全対象者~
~
アクセス権~
'r'----読み込み権限~
'w'----書き込み権限~
'x'----実行権限~
~
複数の条件指定時~
&color(red,){'' find ./ -perm -u=r -perm -g=r ''};~
~
- ''Example:''
~
#highlight(php:nogutter:collapse){{
#
#ls -lR
.:
total 7552
drwxr-xr-x 2 root root 512 Feb 23 14:05 backup
-rw-r-x--- 1 root root 938584 Feb 19 04:22 secure-20180219
-rw------- 1 root root 2715534 Feb 20 04:32 secure-20180220
-rw------- 1 root root 2924721 Feb 21 04:32 secure-20180221
-rw------- 1 root root 576102 Feb 22 04:22 secure-20180222
-rw------- 1 root root 170236 Feb 23 03:45 secure-20180223
./backup:
total 0
#
#find ./ -perm -u=r
./
./backup
./secure-20180223
./secure-20180222
./secure-20180219
./secure-20180221
./secure-20180220
#
#find ./ -perm -g=x
./
./backup
./secure-20180219
#
#find ./ -perm -a=x
./
./backup
#
}}
~
#highlight(end)
~
~
&tag(Linux,find);
~
~
[[Goto Top Page>/]]
~