From the course: Advanced Linux: The Linux Kernel

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Search the kernel source

Search the kernel source - CentOS Tutorial

From the course: Advanced Linux: The Linux Kernel

Start my 1-month free trial

Search the kernel source

- [Instructor] Let's talk now about how to search in the Linux source code for the code for the functionality you want to understand. When we talk search, that often means we want to talk grep. So three common options for grep for me, are the r, little i, little l options, the r is recursive, go through all the sub directories. The little i is ignore case, in case I don't know if stuff is uppercase, or lowercase or a mix. And the l just list the name of the file that has a match instead of the lines that match. That helps me narrow down what files to look in further. For example, grep minus rli sys underscore read with search in the current directory and everything below it for those characters sys underscore read ignoring case. And if there is a match, it will just give the name of the file that has a match. And then the word include means we want to search in the include directory and things below it. Let's try out that…

Contents