简体   繁体   English

查找没有特定权限的文件

[英]Find files without certain permissions

How do I get the name of the first directory (alphabetically) of / that has no read permission for other? 如何获得/的第一个目录的名称(按字母顺序),该目录没有其他目录的读取权限?

I've tried, 我试过了,

find / -type d -perm -o=w+x | sort

find / type d -perm 773 | sort 

I know its probably something really simple but I just cannot get my brain to figure it out! 我知道它可能确实很简单,但是我只是不敢想出办法!

It seems it can be as easy as this. 似乎可以如此简单。

find / -type d -not -perm -o=r -print | sort

The -perm -o=r matches any file that has read permissions for “others”. -perm -o=r具有 “其他”读取权限的任何文件匹配。 The -not prefix negates that. -not前缀将其取反。 The other tests you have already figured out yourself. 您已经弄清楚自己的其他测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM