1
00:00:00,004 --> 00:00:05,002
(lively music)

2
00:00:05,002 --> 00:00:06,009
- [Instructor] Let's look at some solutions

3
00:00:06,009 --> 00:00:07,009
for those challenges.

4
00:00:07,009 --> 00:00:10,006
The first one was, do you have an ethernet

5
00:00:10,006 --> 00:00:12,009
device on your system?

6
00:00:12,009 --> 00:00:19,001
Well, we can find out about PCI devices with lspci

7
00:00:19,001 --> 00:00:22,005
and if we want to just answer that question,

8
00:00:22,005 --> 00:00:25,009
we could say, pipe that into grip ignoring case

9
00:00:25,009 --> 00:00:29,007
and look for ethernet, in case we had a lot of output.

10
00:00:29,007 --> 00:00:31,007
All right, looks like we do.

11
00:00:31,007 --> 00:00:35,004
Next question was how many CPUs?

12
00:00:35,004 --> 00:00:41,001
Well, lscpu prints a lot of information.

13
00:00:41,001 --> 00:00:45,001
Right there it says CPUs on the beginning of the line.

14
00:00:45,001 --> 00:00:50,005
So again, if we wanted minimal amount of output,

15
00:00:50,005 --> 00:00:53,002
we could do something like

16
00:00:53,002 --> 00:00:59,004
match CPU in the beginning of the line.

17
00:00:59,004 --> 00:01:01,004
And we have four.

18
00:01:01,004 --> 00:01:03,009
And then the last challenge question was,

19
00:01:03,009 --> 00:01:07,008
how many disks do you have?

20
00:01:07,008 --> 00:01:12,007
Well, LS block shows all kinds of disk information.

21
00:01:12,007 --> 00:01:16,004
And the things that are disks are called disks,

22
00:01:16,004 --> 00:01:24,000
so if we went like LS block grip disk, we could see those.

23
00:01:24,000 --> 00:01:26,002
And if we wanted to count those,

24
00:01:26,002 --> 00:01:30,004
we could pipe that in WC -l, then count the lines.

25
00:01:30,004 --> 00:01:32,000
We've got four disks on this system.

