我是靠谱客的博主 火星上花瓣,这篇文章主要介绍grep、dmesg 、find普通用法,现在分享给大家,希望可以做个参考。

  •  检索文件内容
复制代码
1
grep " " -nr //从当前目录开始递归检索文件内容
  •  检索缓冲区内容
复制代码
1
dmesg | grep eth //查看网卡启动信息
复制代码
1
dmesg | head -20 //只输出dmesg命令的前20行日志
复制代码
1
dmesg | tail -20 //只输出dmesg命令最后20行日志
复制代码
1
2
3
4
5
6
//搜索包含特定字符串的被检测到的硬件,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

查找文件

复制代码
1
find [路径] -name "filenmae"

最后

以上就是火星上花瓣最近收集整理的关于grep、dmesg 、find普通用法的全部内容,更多相关grep、dmesg内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(62)

评论列表共有 0 条评论

立即
投稿
返回
顶部