使用`找到-perm`找到时没有设置权限 [英] Using `find -perm` to find when a permission is not set

查看:163
本文介绍了使用`找到-perm`找到时没有设置权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想找到我的目录的非可读文件(例如,G-R上的文件)。所以,我想这样的:

I want to find the non-readable files in my directory (eg the files with g-r). So I tried this:

找到。 -perm -g-R

这表明我的所有文件?所以,我想这样的:

It shows me all of the files?? So I tried this:

找到。 -perm -g + R

而事实证明,我只可读的文件。看来, -perm -g-R 匹配的所有文件。我使用CentOS的5.5。难道我做错了什么?它看起来并不像 -perm -g-R 做什么有用的东西。

And it showed me only the readable files. It appears that -perm -g-r matches all files. I'm using CentOS 5.5. Am I doing something wrong? It doesn't look like -perm -g-r does anything useful.

推荐答案

尝试:

找到。 ! -perm -g + R

这篇关于使用`找到-perm`找到时没有设置权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆