LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ls /dev
#1
Hello,

In Chapter 15 of , The Linux Command Line, there is a command -

Code:
sudo tail -f /var/log/messages

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:
Code:
ls /dev
"

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 -

Code:
ls /dev/sd*
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]

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 ?
Reply


Messages In This Thread
ls /dev - by bitsnpcs - 09-21-2018, 03:55 PM
Re: ls /dev - by Valtam - 09-21-2018, 04:46 PM
Re: ls /dev - by bitsnpcs - 09-21-2018, 04:49 PM
Re: ls /dev - by Valtam - 09-21-2018, 10:47 PM
Re: ls /dev - by supergamer - 09-22-2018, 01:34 AM
Re: ls /dev - by bitsnpcs - 09-22-2018, 01:52 AM
Re: ls /dev - by Moltke - 09-22-2018, 11:51 AM
Re: ls /dev - by bitsnpcs - 09-22-2018, 02:26 PM
Re: ls /dev - by Moltke - 09-22-2018, 08:10 PM
Re: ls /dev - by bitsnpcs - 09-23-2018, 01:07 AM
Re: ls /dev - by Moltke - 09-23-2018, 12:15 PM
Re: ls /dev - by trinidad - 09-23-2018, 03:31 PM
Re: ls /dev - by bitsnpcs - 09-23-2018, 05:57 PM
Re: ls /dev - by Moltke - 09-23-2018, 06:45 PM
Re: ls /dev - by Valtam - 09-23-2018, 06:53 PM
Re: ls /dev - by Moltke - 09-23-2018, 09:15 PM
Re: ls /dev - by bitsnpcs - 09-23-2018, 09:29 PM
Re: ls /dev - by firenice03 - 09-24-2018, 12:50 AM
Re: ls /dev - by Moltke - 09-24-2018, 03:32 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)