Basic question regarding the ls utility. What do letters "b" and "c" mean at the beginning of the 10-symbol code describing the item privileges ?

From what I understand, when typing ls -l, the terminal provides a list of all items in a directory. Each item description is preceded by a 10-symbol code. This code says what is the item type (first symbol) and what are the item privileges for the user, the user group and all other users.

If the first symbol is a dash "-", the item is a file.

If the first symbol is letter "d", the item is a directory.

If the first symbol is letter "l", the item is a link / shortcut

phodor@ubuntu: ls -l /home/phodor
total 68
drwxr-xr-x 5 phodor phodor 4096 Dec 20 12:02 Documents
drwxr-xr-x 9 phodor phodor 4096 Jan 17 12:02 Desktop
drwxr-xr-x 7 phodor phodor 4096 Jan 13 22:42 Downloads
-rw-r--r-- 1 phodor phodor 8980 Jun 27  2015 hello.txt
lrwxrwxrwx 1 phodor phodor   29 Jan 17 12:02 MyEBook -> /home/phodor/Documents/EBook.pdf

However some items 10-symbol code also start with "b" or "c".

phodor@ubuntu: ls -l /dev
crw--w---- 1 root tty  4, 0 Jan 17 09:19 tty0
brw-rw---- 1 root disk 1, 0 Jan 17 09:19 ram0
brw-rw---- 1 root disk 8, 0 Jan 17 09:19 sda

What do "b" and "c" mean ? What is the full list of values that the 1st symbol of the file description code can take (-, d, l, b, c, ...) ?



block special file 

character special file 
| improve this answer | |
  • 2
    where "special file" means it is a device node, as created using mknod(). These are the interfaces to the kernel for various device drivers. – Colin Ian King Jan 17 '16 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.