From the course: Advanced Linux: The Linux Kernel

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Solution: Drivers and device files

Solution: Drivers and device files - Linux Tutorial

From the course: Advanced Linux: The Linux Kernel

Solution: Drivers and device files

(upbeat music begins) - [Instructor] Some fun with Dev Null, everybody's favorite device file, I think. Let's start out by looking at the file dev null and finding the major number, and it's number one. All righty, it's also minor number three, but let's see all the other device files, major number one. So let's look in Dev and we're going to grep space one comma space. And we check to make sure we're looking at only character device files. There's any B's in there, they could also be a one, but they would be a block driver, not a character driver. So that'd be a different device driver. But all these are C, they're all one. So these are all implemented, turns out, by the same driver. Now, for other sorts of major minor numbers, it might be possible that different minor numbers are implemented by different drivers, but for number one, it's the same driver. It's the memory driver. And notice that dev null everybody has write access to. Makes sense, right? Because you're always doing…

Contents