Linux 准确查找结构体定义位置
生活随笔
收集整理的這篇文章主要介紹了
Linux 准确查找结构体定义位置
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
例如:查找文件操作結(jié)構(gòu)體 struct file_operations,
使用轉(zhuǎn)移符 "\"?
$?grep struct\ file_operations\ { kernel/include/ -rn
使用雙引號
$?grep "struct file_operations {" kernel/include/ -rn
?
下面這種方式,會查找到所有含有 file_operations 的結(jié)構(gòu)體,包括定義,聲明,使用。
$?grep file_operations kernel/include/ -rn
下面這種方式,只會匹配struct,所以含有struct的都會顯示。
$?grep struct file_operations { kernel/include/ -rn
?
轉(zhuǎn)載于:https://www.cnblogs.com/lialong1st/p/8663699.html
總結(jié)
以上是生活随笔為你收集整理的Linux 准确查找结构体定义位置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: “兼亦竞腥膻”下一句是什么
- 下一篇: 达克宁多少钱啊?