gpt4 book ai didi

linux - 查找没有特定权限的文件

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:49:19 26 4
gpt4 key购买 nike

如何获取/的第一个目录(按字母顺序)的名称,而其他目录没有读取权限?

我试过了,

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

find / type d -perm 773 | sort

我知道它可能非常简单,但我就是无法让我的大脑弄明白!

最佳答案

看起来它可以这么简单。

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

-perm -o=r 匹配任何具有“其他”读取权限的文件。 -not 前缀否定了这一点。其他测试你已经自己想出来了。

关于linux - 查找没有特定权限的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33486786/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com