在Mac OS中查找可写文件

时间:2013-04-17 14:07:07

标签: linux macos find

我想在我的目录中找到(递归)可写文件。我的操作系统是MacOS。

我试过了:

find . -type  -writable

但shell返回错误:

  

find:-type:-writable:unknown type

为什么我收到错误?还有替代品吗?

1 个答案:

答案 0 :(得分:5)

由谁写?

如果你的意思是任何人可写,你可以使用:

find . -type f -perm -0222

find . -type f -perm -ugo=w

如果您的意思是other可写,请使用:

find . -type f -perm -0002

find . -type f -perm -o=w