查找文件
find ./ -type f

查找目录
find ./ -type d

查找名字为test的文件或目录
find ./ -name test

查找名字符合正则表达式的文件,注意前面的‘.*’(查找到的文件带有目录)
find ./ -regex .*so.*\.gz

查找目录并列出目录下的文件(为找到的每一个目录单独执行ls命令,没有选项-print时文件列表前一行不会显示目录名称)
find ./ -type d -print -exec ls {} \;

查找目录并列出目录下的文件(为找到的每一个目录单独执行ls命令,执行命令前需要确认)
find ./ -type d -ok ls {} \;

查找目录并列出目录下的文件(将找到的目录添加到ls命令后一次执行,参数过长时会分多次执行)
find ./ -type d -exec ls {} +

查找文件名匹配*.c的文件
find ./ -name \*.c

打印test文件名后,打印test文件的内容
find ./ -name test -print -exec cat {} \;

不打印test文件名,只打印test文件的内容
find ./ -name test -exec cat {} \;

查找文件更新日时在距现在时刻二天以内的文件
find ./ -mtime -2

查找文件更新日时在距现在时刻二天以上的文件
find ./ -mtime +2

查找文件更新日时在距现在时刻一天以上二天以内的文件
find ./ -mtime 2

查找文件更新日时在距现在时刻二分以内的文件
find ./ -mmin -2

查找文件更新日时在距现在时刻二分以上的文件
find ./ -mmin +2

查找文件更新日时在距现在时刻一分以上二分以内的文件
find ./ -mmin 2

查找文件更新时间比文件abc的内容更新时间新的文件
find ./ -newer abc

查找文件访问时间比文件abc的内容更新时间新的文件
find ./ -anewer abc

查找空文件或空目录
find ./ -empty

查找空文件并删除
find ./ -empty -type f -print -delete

查找权限为644的文件或目录(需完全符合)
find ./ -perm 664

查找用户/组权限为读写,其他用户权限为读(其他权限不限)的文件或目录
find ./ -perm -664

查找用户有写权限或者组用户有写权限的文件或目录
find ./ -perm /220
find ./ -perm /u+w,g+w
find ./ -perm /u=w,g=w

查找所有者权限有读权限的目录或文件
find ./ -perm -u=r

查找用户组权限有读权限的目录或文件
find ./ -perm -g=r

查找其它用户权限有读权限的目录或文件
find ./ -perm -o=r

查找所有者为lzj的文件或目录
find ./ -user lzj

查找组名为gname的文件或目录
find ./ -group gname

查找文件的用户ID不存在的文件
find ./ -nouser

查找文件的组ID不存在的文件
find ./ -nogroup

查找有执行权限但没有可读权限的文件
find ./ -executable \! -readable

查找文件size小于10个字节的文件或目录
find ./ -size -10c

查找文件size等于10个字节的文件或目录
find ./ -size 10c

查找文件size大于10个字节的文件或目录
find ./ -size +10c

查找文件size小于10k的文件或目录
find ./ -size -10k

查找文件size小于10M的文件或目录
find ./ -size -10M

查找文件size小于10G的文件或目录
find ./ -size -10G

linux find command information more的更多相关文章

  1. 12 Linux Which Command, Whatis Command, Whereis Command Examples

    This Linux tutorial will explain the three "W" commands. The three "W"s are what ...

  2. learn Linux sed command

    learn Linux sed command 一.参考文档: . sed命令详解 http://qifuguang.me/2015/09/21/sed%E5%91%BD%E4%BB%A4%E8%AF ...

  3. Linux:-bash: ***: command not found

    Linux:-bash: ***: command not found,系统很多命令都用不了,均提示没有此命令. 突然之间linux很多命令都用不了,均提示没有此命令. 这应该是系统环境变量出现了问题 ...

  4. 【Linux】-NO.8.Linux.4.Command.1.001-【Common Command】-

    1.0.0 Summary Tittle:[Linux]-NO.8.Linux.4.Command.1.001-[Common Command]- Style:Linux Series:Command ...

  5. Linux cp command All In One

    Linux cp command All In One $ man cp $ cp -h # 强制 $ cp -f # 递归,复制文件夹 $ cp -r demos cp -fr # ./folder ...

  6. how to using Linux pipe command output another command's help content to a file

    how to using Linux pipe command output another command's help content to a file Linux tee > >& ...

  7. EXPORT Man Information for Linux use COMMAND col

    col命令 是一个标准输入文本过滤器,它从标注输入设备读取文本内容,并把内容显示到标注输出设备.在许多UNIX说明文件里,都有RLF控制字符.当我们运用shell特殊字符>和>>,把 ...

  8. Linux / Unix Command: bunzip2--reference

    http://linux.about.com/library/cmd/blcmdl1_bunzip2.htm NAME bzip2, bunzip2 - a block-sorting file co ...

  9. 10 Linux DIG Command Examples for DNS Lookup--reference

    by RAMESH NATARAJAN on FEBRUARY 29, 2012 http://www.thegeekstuff.com/2012/02/dig-command-examples/ D ...

随机推荐

  1. Java并发编程的艺术(五)——中断

    什么是中断? 在Java中没有办法立即停止一条线程,然而停止线程却显得尤为重要,如取消一个耗时操作.因此,Java提供了一种用于停止线程的机制——中断. 中断只是一种协作机制,Java没有给中断增加任 ...

  2. 用SAX和PULL进行XML文件的解析与生成

    XML解析有传统的dom方法还有Jsoup,SAX,PULL等,这里讲的是比较省内存的SAX和PULL方法.Android中极力推荐用PULL的方式来解析,我个人觉得pull确实比较简单,但其内部的逻 ...

  3. List转换为字符串并添加分隔符

    // 方法一: public String listToString(List list, char separator) { StringBuilder sb = new StringBuilder ...

  4. 这篇文章写的真好-NLP将迎来黄金十年-书摘

    机器之心上面微软亚研的这篇文章真好: https://baijiahao.baidu.com/s?id=1618179669909135692&wfr=spider&for=pc 其中 ...

  5. C#实现json的序列化和反序列化

    在做asp.net和unity进行http通信的时候,当unity客户端发出表单请求的时候,我要将他要请求的数据以json的格式返回给客户端,让客户端来解析.服务器端这一块就涉及到json的序列化和反 ...

  6. C++类中的访问权限问题

    纠结的东西: private,public,protected方法的访问范围.(public继承下)private: 只能由该类中的函数.其友元函数访问,不能被任何其他访问,该类的对象也不能访问. p ...

  7. 从item-base到svd再到rbm,多种Collaborative Filtering(协同过滤算法)从原理到实现

    http://blog.csdn.net/dark_scope/article/details/17228643 〇.说明 本文的所有代码均可在 DML 找到,欢迎点星星. 一.引入 推荐系统(主要是 ...

  8. 利用NATAPP隧道解决微信公众号开发之本地调试难题

    一.问题 众所周知,微信公众号开发需要公网的有效域名和80端口,本机当然互联网是访问不了的.那么我们难道去一个公网的服务器去开发吗?那样是不是太土了. 答案当然是,NO 当然我们在做微信支付的时候,有 ...

  9. (转)NGUI中深度depth和z轴关系

    先列出转载链接: http://game.ceeger.com/forum/read.php?tid=8917 转载原文: 问题源自一个帖子,因为上传的图比较多,就另开了这个贴写下自己的试验结果,原帖 ...

  10. node.js " The requested service provider could not be loaded or initialized"

    I'm trying to use any of the NodeJS or NPM commands but I always got the following error: socket: (1 ...