- 检索文件内容
grep " " -nr //从当前目录开始递归检索文件内容
- 检索缓冲区内容
dmesg | grep eth //查看网卡启动信息
dmesg | head -20 //只输出dmesg命令的前20行日志
dmesg | tail -20 //只输出dmesg命令最后20行日志
//搜索包含特定字符串的被检测到的硬件,grep 命令的‘-i’选项表示忽略大小写
[root@tecmint.com log]# dmesg | grep -i usb
[root@tecmint.com log]# dmesg | grep -i dma
[root@tecmint.com log]# dmesg | grep -i tty
[root@tecmint.com log]# dmesg | grep -i memory
查找文件
find [路径] -name "filenmae"