I spent the last half hour googling with no success. What does the "b" mean and how is it controlled?
[root@box10 bobg]# ll /dev/sdb* brw-rw----. 1 root disk 8, 16 Sep 23 14:36 /dev/sdb brw-rw----. 1 root disk 8, 17 Sep 23 14:36 /dev/sdb1
Bob
"b" stands for block device; just like "c" will represent a character device.
I looked all over the place for that kind of information years ago... strangely, I found in when scanning the man page for 'find'.
From: "Bob Goodwin ~ Zuni, Virginia, USA" bobgoodwin@wildblue.net To: Fedora List users@lists.fedoraproject.org Sent: Monday, September 23, 2013 3:05 PM Subject: permissions -
I spent the last half hour googling with no success. What does the "b" mean and how is it controlled?
[root@box10 bobg]# ll /dev/sdb* brw-rw----. 1 root disk 8, 16 Sep 23 14:36 /dev/sdb brw-rw----. 1 root disk 8, 17 Sep 23 14:36 /dev/sdb1
Bob
--
box10 Fedora-19 Linux/XFCE
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On Mon, Sep 23, 2013 at 12:08:57PM -0700, Joe Wulf wrote:
"b" stands for block device; just like "c" will represent a character device.
I looked all over the place for that kind of information years ago... strangely, I found in when scanning the man page for 'find'.
This may be helpful, specifically section 10.1.2:
$ info --subnodes ls | less
I spent the last half hour googling with no success. What does the "b" mean and how is it controlled?
[root@box10 bobg]# ll /dev/sdb* brw-rw----. 1 root disk 8, 16 Sep 23 14:36 /dev/sdb brw-rw----. 1 root disk 8, 17 Sep 23 14:36 /dev/sdb1
Bob
The first character is the file type. A 'b' indicates a block device
On Mon, Sep 23, 2013 at 2:05 PM, Bob Goodwin ~ Zuni, Virginia, USA bobgoodwin@wildblue.net wrote:
I spent the last half hour googling with no success. What does the "b" mean and how is it controlled?
[root@box10 bobg]# ll /dev/sdb* brw-rw----. 1 root disk 8, 16 Sep 23 14:36 /dev/sdb brw-rw----. 1 root disk 8, 17 Sep 23 14:36 /dev/sdb1
It is a block/buffered special file. See mknod.
John
On Mon, Sep 23, 2013 at 03:05:45PM -0400, Bob Goodwin ~ Zuni, Virginia, USA wrote:
I spent the last half hour googling with no success. What does the "b" mean and how is it controlled?
[root@box10 bobg]# ll /dev/sdb* brw-rw----. 1 root disk 8, 16 Sep 23 14:36 /dev/sdb brw-rw----. 1 root disk 8, 17 Sep 23 14:36 /dev/sdb1
It means the file is a block device node. Typically control of that file/device is through a device driver. In this case these are respectively your second SCSI (or emulated SCSI, such as sATA) disk device, and the first addressable partition on that device.
On 23/09/13 15:13, Paul W. Frields wrote:
[root@box10 bobg]# ll /dev/sdb* brw-rw----. 1 root disk 8, 16 Sep 23 14:36 /dev/sdb brw-rw----. 1 root disk 8, 17 Sep 23 14:36 /dev/sdb1
It means the file is a block device node. Typically control of that file/device is through a device driver. In this case these are respectively your second SCSI (or emulated SCSI, such as sATA) disk device, and the first addressable partition on that device.
-- Paul W. Frields http://paul.frields.org/
Yes it's an usb external hard drive I've been playing with, reformatted it to vfat and then messed with gparted although I did not intentionally change anything it no longer appears on my desktop. While doing this I was curious about the brw-rw----. Thought it might contribute to my problem, no sure if it wa there before ...
Bob
On 23.09.2013 21:05, Bob Goodwin ~ Zuni, Virginia, USA wrote:
I spent the last half hour googling with no success. What does the "b" mean and how is it controlled?
[root@box10 bobg]# ll /dev/sdb* brw-rw----. 1 root disk 8, 16 Sep 23 14:36 /dev/sdb brw-rw----. 1 root disk 8, 17 Sep 23 14:36 /dev/sdb1
Bob
http://en.wikipedia.org/wiki/Ls ;) File types
$ ll --color /dev/sdb*
$ file /dev/sdb* # file --special-files /dev/sdb*
poma
On 23/09/13 16:07, poma wrote:
http://en.wikipedia.org/wiki/Ls;) File types
$ ll --color /dev/sdb*
$ file /dev/sdb* # file --special-files /dev/sdb*
poma
Are you saying that the "b" is merely to control the color in a listing? I view everything in black and white.
Does it have any other effect?
Is there a mknod command to remove it, the man page does not make it clear to me.
Thanks for responding.
Bob
Bob,
In Unix everything is a file... regular files, links, directories as well as the block and character special devices. These entities you are seeing have a specific purpose to keep the Unix Operating system functioning.
Now, the /bin/ls binary has functionality that allows colorization based upon file type, and other factors. Yes, like you, I typically work in listings that are black and white for ease of viewing.
The block device for /dev/sdb is used by a driver in the kernel to access that disk drive. /dev/sdb1, for example, would be the first partition on that disk drive, etc...
Why are you worried about these?
From: "Bob Goodwin ~ Zuni, Virginia, USA" bobgoodwin@wildblue.net To: users@lists.fedoraproject.org Sent: Monday, September 23, 2013 4:58 PM Subject: Re: permissions -
On 23/09/13 16:07, poma wrote:
http://en.wikipedia.org/wiki/Ls;) File types
$ ll --color /dev/sdb*
$ file /dev/sdb* # file --special-files /dev/sdb*
poma
Are you saying that the "b" is merely to control the color in a listing? I view everything in black and white.
Does it have any other effect?
Is there a mknod command to remove it, the man page does not make it clear to me.
Thanks for responding.
Bob
--
box10 Fedora-19 Linux/XFCE
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On Mon, Sep 23, 2013 at 3:58 PM, Bob Goodwin ~ Zuni, Virginia, USA bobgoodwin@wildblue.net wrote:
Are you saying that the "b" is merely to control the color in a listing? I view everything in black and white.
Does it have any other effect?
It is informative, it tells you what sort of "file" you are looking at. No different than
# ls -ld /usr/bin dr-xr-xr-x. 2 root root 69632 Sep 23 09:20 /usr/bin
which begins with a 'd' telling you that /usr/bin is a directory.
Is there a mknod command to remove it, the man page does not make it clear to me.
There is no need to remove it. Just don't worry about the first character displayed if you aren't interested in it.
John
On 23/09/13 17:14, inode0 wrote:
It is informative, it tells you what sort of "file" you are looking at. No different than
# ls -ld /usr/bin dr-xr-xr-x. 2 root root 69632 Sep 23 09:20 /usr/bin
which begins with a 'd' telling you that /usr/bin is a directory.
Is there a mknod command to remove it, the man page does not make it clear to me.
There is no need to remove it. Just don't worry about the first character displayed if you aren't interested in it.
John
Good, that is the essence of what I wanted to know. It's just information and apparently can be used to colorize a listing. Those have puzzled me for a long time.
Thanks to all,
Bob
On 23/09/13 15:05, Bob Goodwin ~ Zuni, Virginia, USA wrote:
I spent the last half hour googling with no success. What does the "b" mean and how is it controlled?
[root@box10 bobg]# ll /dev/sdb* brw-rw----. 1 root disk 8, 16 Sep 23 14:36 /dev/sdb brw-rw----. 1 root disk 8, 17 Sep 23 14:36 /dev/sdb1
Bob
Perhaps I did not make that clear, I refer to the the "b" in "brw-rw----."
09/23/2013 01:13 PM, Bob Goodwin ~ Zuni, Virginia, USA wrote:
On 23/09/13 15:05, Bob Goodwin ~ Zuni, Virginia, USA wrote:
I spent the last half hour googling with no success. What does the "b" mean and how is it controlled?
[root@box10 bobg]# ll /dev/sdb* brw-rw----. 1 root disk 8, 16 Sep 23 14:36 /dev/sdb brw-rw----. 1 root disk 8, 17 Sep 23 14:36 /dev/sdb1
Bob
Perhaps I did not make that clear, I refer to the the "b" in "brw-rw----."
There are two types of /devices, block and character. "b" refers to block devices (typically ones with filesystems). "c" refers to character devices (things like keyboards and mouses, modems, and other serial devices).
I don't think you can just change them around ;)
On 09/23/2013 01:13 PM, Bob Goodwin ~ Zuni, Virginia, USA issued this missive:
On 23/09/13 15:05, Bob Goodwin ~ Zuni, Virginia, USA wrote:
I spent the last half hour googling with no success. What does the "b" mean and how is it controlled?
[root@box10 bobg]# ll /dev/sdb* brw-rw----. 1 root disk 8, 16 Sep 23 14:36 /dev/sdb brw-rw----. 1 root disk 8, 17 Sep 23 14:36 /dev/sdb1
Bob
Perhaps I did not make that clear, I refer to the the "b" in "brw-rw----."
The first character in an "ls -l" is the type of file. From the info page (info ls...navigate to "What information is listed"):
The file type is one of the following characters:
'-' regular file 'b' block special file 'c' character special file 'C' high performance ("contiguous data") file 'd' directory 'D' door (Solaris 2.5 and up) 'l' symbolic link 'M' off-line ("migrated") file (Cray DMF) 'n' network special file (HP-UX) 'p' FIFO (named pipe) 'P' port (Solaris 10 and up) 's' socket '?' some other file type ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 - - - - To get that bulldozer airborne, we need more explosives. - - -- Jamie Hyneman - ----------------------------------------------------------------------