mat*_*tja 34
find -type f -maxdepth 1 -writable
Run Code Online (Sandbox Code Playgroud)
Pau*_*ce. 16
该-writable
选项将查找当前用户可写的文件.如果您想查找任何人(甚至其他组合)可写的文件,您可以使用以下-perm
选项:
find -maxdepth 1 -type f -perm /222
Run Code Online (Sandbox Code Playgroud)
这将找到其所有者(无论是谁)可写的文件:
find -maxdepth 1 -type f -perm /200
Run Code Online (Sandbox Code Playgroud)
可以使用各种字符来控制mode参数的含义:
/
- 任何许可位-
- 所有位(-222
意味着全部 - 用户,组和其他)222
意味着没有写入除外)