09-21-2018, 03:55 PM
Hello,
In Chapter 15 of , The Linux Command Line, there is a command -
It should produce a list and then a SD card is added , it is an example of how the kernel will notice the device and probe it. I can follow the example in the book.
When I run this command (which is not an exercise in the book but I wanted to see it in action) I cannot get a result in terminal myself to then add a USB stick and watch this in action. Maybe the path needs to be different ?
Earlier in the Chapter I had read this -
"quote of Mr.Shotts - First let's look at how the system names devices. If we list the contents of the /dev directory (where all devices live), we can see that there are lots and lots of devices:
"
This gave me an idea to experiment using the above command, I was trying this below code to determine newly added device names by comparison -
My belief was it would show only those with sd naming using the wildcard *, I had learned previously in earlier chapters of "The Linux Command Line" about sd, and about using wildcard.
Below is a screenshot of my output, and source of my question
![[Image: Screenshot_2018_09_21_15_40_46.png]](https://preview.ibb.co/dT0EZz/Screenshot_2018_09_21_15_40_46.png)
As you can see I ran the code , I then inserted a USB stick and used up arrow on keyboard to reuse the same code and run it again, thus allowing for a comparison of before and after adding the USB stick.
It produced 2 new results the /dev/sdb and the /dev/sdb1 rather than the 1 new result I was expecting, why is this ?
In Chapter 15 of , The Linux Command Line, there is a command -
Code:
sudo tail -f /var/log/messagesIt should produce a list and then a SD card is added , it is an example of how the kernel will notice the device and probe it. I can follow the example in the book.
When I run this command (which is not an exercise in the book but I wanted to see it in action) I cannot get a result in terminal myself to then add a USB stick and watch this in action. Maybe the path needs to be different ?
Earlier in the Chapter I had read this -
"quote of Mr.Shotts - First let's look at how the system names devices. If we list the contents of the /dev directory (where all devices live), we can see that there are lots and lots of devices:
Code:
ls /devThis gave me an idea to experiment using the above command, I was trying this below code to determine newly added device names by comparison -
Code:
ls /dev/sd*Below is a screenshot of my output, and source of my question
![[Image: Screenshot_2018_09_21_15_40_46.png]](https://preview.ibb.co/dT0EZz/Screenshot_2018_09_21_15_40_46.png)
As you can see I ran the code , I then inserted a USB stick and used up arrow on keyboard to reuse the same code and run it again, thus allowing for a comparison of before and after adding the USB stick.
It produced 2 new results the /dev/sdb and the /dev/sdb1 rather than the 1 new result I was expecting, why is this ?


![[Image: X5qGkCg.png]](https://imgur.com/X5qGkCg.png)
![[Image: 0op1GNe.png]](https://i.imgur.com/0op1GNe.png)
![[Image: LgJ2mtP.png]](https://i.imgur.com/LgJ2mtP.png)
![[Image: vLZcFUE.png]](https://imgur.com/vLZcFUE.png)
![[Image: lrUHro3.jpg]](https://i.imgur.com/lrUHro3.jpg)
![[Image: 10dh5k4.jpg]](http://i66.tinypic.com/10dh5k4.jpg)