记一下我遇到过的:
!表示否定
-a 表示并且
-o  或者
 
perm注意权限模式,有无 -,单表含义不同,有-是表示属主、组、其他组权限对应(即某位为0时,表示不指定要匹配的权限,而不是没有权限), 没有-时表示所有权限综合
////有解释说-表示都匹配,如-0005表示0555;需要验证一下真假
[root@localhost ~]# chmod 005 /etc/ppp

[root@localhost ~]# ls -ld /etc/ppp

d------r-x. 3 root root 4096 1月  25 23:13 /etc/ppp

[root@localhost ~]# find /etc/ppp  \( -perm -005 \) -print

/etc/ppp

/etc/ppp/ip-down

/etc/ppp/ip-down.ipv6to4

/etc/ppp/ip-up

/etc/ppp/ip-up.ipv6to4

/etc/ppp/ipv6-down

/etc/ppp/ipv6-up

/etc/ppp/peers


[root@localhost ~]# chmod 005 /etc/ppp

[root@localhost ~]# ls -ld /etc/ppp

d------r-x. 3 root root 4096 1月  25 23:13 /etc/ppp

[root@localhost ~]# find /etc/ppp  \( -perm 111 \) -print

[root@localhost ~]# find /etc/ppp  \( -perm -001 \) -print

/etc/ppp

/etc/ppp/ip-down

/etc/ppp/ip-down.ipv6to4

/etc/ppp/ip-up

/etc/ppp/ip-up.ipv6to4

/etc/ppp/ipv6-down

/etc/ppp/ipv6-up

/etc/ppp/peers

[root@localhost ~]#

//////////////////
如上,我改目录权限为005,使用-perm -005 输出了该目录,说明匹配的不是555;
使用-perm 111时无输出,使用-perm -001时,输出目录
说明-匹配的是包含有该位指定权限的
而不是都匹配;
没有-时,表示要匹配完全相同的权限,证明如下:
[root@localhost ~]# ls -la /etc/ppp

总用量 64

d--x--xr-x.   3 root root 4096 1月  25 23:13 .

drwxr-xr-x. 134 root root 8192 1月  27 00:35 ..

-rw-------.   1 root root   78 8月  10 03:03 chap-secrets

-rw-------.   1 root root  349 8月  10 03:03 eaptls-client

-rw-------.   1 root root  405 8月  10 03:03 eaptls-server

-rwxr-xr-x.   1 root root  386 4月   2 2014 ip-down

-rwxr-xr-x.   1 root root 3214 4月   2 2014 ip-down.ipv6to4

-rwxr-xr-x.   1 root root  430 4月   2 2014 ip-up

-rwxr-xr-x.   1 root root 6426 4月   2 2014 ip-up.ipv6to4

-rwxr-xr-x.   1 root root 1687 4月   2 2014 ipv6-down

-rwxr-xr-x.   1 root root 3182 4月   2 2014 ipv6-up

-rw-r--r--.   1 root root    5 8月  10 03:03 options

-rw-------.   1 root root   77 8月  10 03:03 pap-secrets

drwxr-xr-x.   2 root root   19 1月  25 23:17 peers

[root@localhost ~]# find /etc/ppp  \( -perm 115 \) -print

/etc/ppp

[root@localhost ~]# find /etc/ppp  \( -perm 111 \) -print

[root@localhost ~]#

/////////////////
 
 
 
 
比如:
# find PART -xdev -type d \( -perm -0002 -a ! -perm -1000 \) -print
 
找出其他用户可写且未设置stricky的目录
 
 
 
 

-xdev选项,那么仅仅会在在当前文件系统中搜索,下面是在xdev的man page上面找到的一段-xdev的定义:

  • -xdev Don’t descend directories on other filesystems.

会在/目录及其子目录下搜索当前文件系统(也就是/挂载的文件系统

http://blog.sae.sina.com.cn/archives/950

find命令 参数的更多相关文章

  1. linux管道命令grep命令参数及用法详解---附使用案例|grep

    功能说明:查找文件里符合条件的字符串. 语 法:grep [-abcEFGhHilLnqrsvVwxy][-A<显示列数>][-B<显示列数>][-C<显示列数>] ...

  2. Linux xargs将输出数据流转换成命令参数

    200 ? "200px" : this.width)!important;} --> 介绍 我们可以利用管道将一个命令的“标准输出”作为另一个命令的“标准输入”:但是这里的 ...

  3. 烂泥:【转】rsync命令参数详解

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. rsync安装完毕后,我们可以通过rsync –help查看rysnc命令的使用.如下: 有关rsync的命令格式,在此我们就不多介绍了.如果有想了解的 ...

  4. linux mount命令参数及用法详解

    linux mount命令参数及用法详解 非原创,主要来自 http://www.360doc.com/content/13/0608/14/12600778_291501907.shtml. htt ...

  5. protoc 命令参数

    protoc 命令的获得 源码在 https://github.com/google/protobuf , 如果不想自己编译获得最新版本,则可以下载官方编译好的各个平台的,下载地址:https://g ...

  6. linux中touch命令参数修改文件的时间戳(转)

    linux中touch命令参数不常用,一般在使用make的时候可能会用到,用来修改文件时间戳,或者新建一个不存在的文件,以下是linux中touch命令参数的使用方法: touch [-acm][-r ...

  7. 【转】linux expr命令参数及用法详解

    在抓包过程中,查看某个设定时间内,数据上下行多少,用命令expr 计算! --------------------------------------------------------------- ...

  8. linux useradd(adduser)命令参数及用法详解(linux创建新用户命令)

    linux useradd(adduser)命令参数及用法详解(linux创建新用户命令) useradd可用来建立用户帐号.帐号建好之后,再用passwd设定帐号的密码.而可用userdel删除帐号 ...

  9. linux dmesg命令参数及用法详解(linux显示开机信息命令)

    linux dmesg命令参数及用法详解(linux显示开机信息命令) http://blog.csdn.net/zhongyhc/article/details/8909905 功能说明:显示开机信 ...

  10. linux sed命令参数及用法详解

    linux sed命令参数及用法详解 http://blog.csdn.net/namecyf/article/details/7336308 1. Sed简介 sed 是一种在线编辑器,它一次处理一 ...

随机推荐

  1. 【Shell脚本学习指南笔记】重定向文件描述符 2>&1

    如: make > results 2>&1 重定向 > results让文件描述符1(标准输出)作为文件results,接下来的重定向2>&1有两个部分.2& ...

  2. 一步一步从原理跟我学邮件收取及发送 9.多行结果与socket的阻塞

    前几篇的文章发表后,有网友留言说没有涉及到阻塞的问题吗?在 socket 的编程当中,这确实是个很重要的问题.结合目前我们文章的内容进度,我们来看看为什么说阻塞概念很重要. 接着上篇的内容,当我们发送 ...

  3. Git 2.0 更改 push default

    近期更新了git,项目push时会提示这样的信息: warning: push.default 尚未设置,它的默认值在 Git 2.0 已从 'matching' 变更为 'simple'.若要不再显 ...

  4. 跟我一起读postgresql源码(十六)——Executor(查询执行模块之——control节点(下))

    5.ModifyTable节点 先看一个ModifyTable节点的例子: postgres=# explain update test_01 set id = 5 where name = 'xxx ...

  5. IO&&Serize 利用线程Thread.Sleep实现"自动输出"

    查看链接 https://github.com/jungle8884/C-.Net/tree/MyClassLibrary using System; using System.Collections ...

  6. R语言-广义线性模型

    使用场景:结果变量是类别型,二值变量和多分类变量,不满足正态分布  结果变量是计数型,并且他们的均值和方差都是相关的 解决方法:使用广义线性模型,它包含费正太因变量的分析 1.Logistics回归( ...

  7. LeetCode - 627. Swap Salary

    Given a table salary, such as the one below, that has m=male and f=female values. Swap all f and m v ...

  8. ionic2+Angular 组件(多个组件)浅谈

    第一步,新建组件: ionic g component product-img-list 命令执行成功之后项目中生成的文件: 第二步:生成文件解析: ①product-img-list.ts impo ...

  9. Golang学习 - strconv 包--数据类型转换

    // 将布尔值转换为字符串 true 或 false func FormatBool(b bool) string // 将字符串转换为布尔值 // 它接受真值:1, t, T, TRUE, true ...

  10. httping:测量网站延迟

    遇到网络问题的时候,我们一般会先通过 ping 这个工具来了解基本的情况.httping 与 ping 类似,不过它不是发送 ICMP 请求,而是发送 HTTP 请求.利用 httping,我们可以测 ...