Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: mocore on October 22, 2011, 05:48:32 AM

Title: why "ls /dev/sd [tab]" shows partitions that dont exist !
Post by: mocore on October 22, 2011, 05:48:32 AM

 mount tool shows me  sda1 sdb1
 as options but
 
Code: [Select]
ls /dev/sd [tab]  gives
Quote
sda   sda2 sda4 sda6 sda8  sdb   sdb2 sdb4 sdb6 sdb8
sda1 sda3 sda5 sda7 sda9  sdb1 sdb3 sdb5 sdb7 sdb9
i know that older versions of tinycore shows the same non-existing devices as folders under /mnt/ 
 but as that is no longer the case
 im intrested to know
 why/how  /dev/sd*  shows the non existing partitions

thanx
Title: Re: why "ls /dev/sd [tab]" shows partitions that dont exist !
Post by: curaga on October 22, 2011, 05:52:34 AM
We have a basic set of devices pre-created in /dev, as a backup in case udev doesn't work etc.
Title: useing `ls -l ` to identify existing partitions
Post by: mocore on May 12, 2026, 08:30:56 AM

just quoting this related snippet from another topic
..thanks to Rich for the explanation of this method
& curaga for the explaining the reasoning behind the non existent device files

This is  /dev/sdb  on one of my systems:
Code: [Select]
tc@E310:~$ ls /dev/sdb*
/dev/sdb  /dev/sdb1  /dev/sdb2  /dev/sdb3  /dev/sdb4  /dev/sdb5  /dev/sdb6  /dev/sdb7  /dev/sdb8  /dev/sdb9
tc@E310:~$

It looks like that device has 9 partitions, but it really has only 2.

Running the command like this tells a different story:
Code: [Select]
tc@E310:~$ ls -l /dev/sdb*
brw-rw---- 1 root staff 8, 16 Feb 28 11:05 /dev/sdb
brw-rw---- 1 root staff 8, 17 Feb 28 11:05 /dev/sdb1
brw-rw---- 1 root staff 8, 18 Feb 28 11:05 /dev/sdb2
brw-rw-r-- 1 root staff 8, 19 Jun  9  2019 /dev/sdb3
brw-rw-r-- 1 root staff 8, 20 Jun  9  2019 /dev/sdb4
brw-rw-r-- 1 root staff 8, 21 Jun  9  2019 /dev/sdb5
brw-rw-r-- 1 root staff 8, 22 Jun  9  2019 /dev/sdb6
brw-rw-r-- 1 root staff 8, 23 Jun  9  2019 /dev/sdb7
brw-rw-r-- 1 root staff 8, 24 Jun  9  2019 /dev/sdb8
brw-rw-r-- 1 root staff 8, 25 Jun  9  2019 /dev/sdb9
tc@E310:~$
The partitions in this list with a current date are actually mountable.
The  -l  in the command is a lower case L, not a one.