[英]Find writable files in Mac OS
I want to find (recursively) writable files in my directory. 我想在我的目录中找到(递归)可写文件。 My operating system is MacOS. 我的操作系统是MacOS。
I tried: 我试过了:
find . -type -writable
but the shell returns an error: 但shell返回错误:
find: -type: -writable: unknown type find:-type:-writable:未知类型
Why I got the error? 为什么我收到错误? Are there alternatives? 还有替代品吗?
Writable by whom? 可由谁写的?
If you mean writable by any, you can use: 如果你的意思是任何人可写,你可以使用:
find . -type f -perm -0222
or 要么
find . -type f -perm -ugo=w
If you mean writable by other
, use: 如果您的意思是other
可写,请使用:
find . -type f -perm -0002
or 要么
find . -type f -perm -o=w
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.