1. 查找文件

find 路径 -name 文件名

例:find /root -name hello.c

表示从/root目录下查找名为hello.c的文件(自动递归)

2. 从文件中查找字符串

grep "字符串” 路径 参数

例:grep "hello" . -r

表示从当前路径下寻找含有字符串“hello”的文件