Press "Enter" to skip to content

Linux/Unix系统常用查找命令

find / -name httpd.conf 查找根目录下名为httpd.conf的文件
find /etc -name ‘*srm*’ 查找/etc目录下,文件名中间包含srm的文件
find / -name “httpd.conf” -ls 查找根目录下名为httpd.conf的文件,并显示文件信息
find /tmp -size +100c 查找/tmp目录中大于100字节的文件,c表示字节,如果不加c表示查找100块的文件
find / -type d -name httpd 查找根目录下名为httpd的目录

6 Comments

  1. lovvvve 2012-03-15

    find 查找是实时查找但是速度比较慢 可以使用 locate 这个命令来查找 locate 默认会在半夜 执行系统任务 刷新数据库
    locate: 非实时查找 在建好的数据库中查找
    提示没有数据库的话可以locate updatedb 手动执行建立数据库
    locate 要查找到文件

  2. 冲锋衣 2012-03-17

    Linux的一些基础命令确实应该好好学习了。

Leave a Reply to 牛初乳 Cancel reply

Your email address will not be published. Required fields are marked *