查找文件
========
比如知道文件名字為`httpd.conf`, 可以這樣查找
```shell
find / -name httpd.conf
locate httpd.conf
```
或者只知道一部分, 這樣
```shell
find / -name httpd*
locate httpd
```
find的命令結構為
```shell
find [path...][expression]
```
更多的通過
```shell
man find
```
`locate`和`find -name`很像, 這里說一下他們的不同
假如搜索css, find -name只會搜索名稱, 而locate 會包含路徑上都含有css的
locate是搜索索引數據庫, 所以速度比find快, 但是可能不是最新的, `updatedb`更新索引數據庫
locate可以接-i忽略大小寫
find其實功能還有很多, 只是我常用的只用到這些, 他的expression除了name還有很多的
級聯搜索
```shell
locate httpd | grep httpd.conf
```
還有一個命令也可以搜索- `whereis`,但是只能查找可執行文件
```
[root@iZuf6hw ~]# whereis httpd
httpd: /usr/sbin/httpd /usr/lib64/httpd /etc/httpd /usr/share/httpd /usr/share/man/man8/httpd.8.gz
```