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 - CentOS Tutorial
From the course: Advanced Linux: The Linux Kernel
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Get the kernel source8m 23s
-
(Locked)
Explore the kernel makefile4m 59s
-
(Locked)
Examine and build kernel documentation6m 2s
-
(Locked)
Search the kernel source7m 58s
-
(Locked)
Examine kernel driver source4m 2s
-
(Locked)
Additional selected subdirectories8m 49s
-
(Locked)
Challenge: Linux kernel source code26s
-
(Locked)
Challenge: Solution4m 5s
-
(Locked)
-
-