1
00:00:00,000 --> 00:00:05,003
(upbeat music)

2
00:00:05,003 --> 00:00:06,006
- [Instructor] Here's your little challenge

3
00:00:06,006 --> 00:00:09,002
for device files.

4
00:00:09,002 --> 00:00:10,007
If you do a long list on /dev/null,

5
00:00:10,007 --> 00:00:13,003
you'll see its major and minor number.

6
00:00:13,003 --> 00:00:14,008
Can you find other device files

7
00:00:14,008 --> 00:00:17,002
that have the same major number

8
00:00:17,002 --> 00:00:18,005
that are essentially implemented

9
00:00:18,005 --> 00:00:21,002
by the same driver in the kernel?

10
00:00:21,002 --> 00:00:23,000
Also with /dev/null,

11
00:00:23,000 --> 00:00:25,002
you're probably familiar with redirecting output

12
00:00:25,002 --> 00:00:28,005
to /dev/null, which essentially throws it away.

13
00:00:28,005 --> 00:00:31,000
Can you read from /dev/null?

14
00:00:31,000 --> 00:00:32,009
What happens if you try to read from /dev/null?

15
00:00:32,009 --> 00:00:35,002
Do you get an error?

16
00:00:35,002 --> 00:00:40,005
Give that a try. Use strace to figure out what happens

17
00:00:40,005 --> 00:00:43,003
when you cat /dev/null.

18
00:00:43,003 --> 00:00:44,000
Good luck.

