Ubuntu – What does the first character of UNIX mode string indicate

file typefilesfilesystem

I'm very familiar with linux file permissions, and special perms (sticky bit, suid, guid)

But I don't know what the c stands for? Is it a permission, or something else? I've done some googling with and can't figure it out.

Here's the device file that has it.

steven@A215:~$ ls -l /dev/null
crw-rw-rw- 1 root root 1, 3 Dec 29 20:58 /dev/null

enter image description here

Image Reference: https://detailed.wordpress.com/2017/10/28/understanding-ls-command-output/

Best Answer

It means that the file is a character special file - basically a device file that provides serial access (as opposed to a block special device such as a disk drive). For example terminals and serial devices are interfaced through character special files (/dev/tty1, /dev/ttyS0 and so on).

For a brief introduction to device files, see Linux / UNIX: Device files [cyberciti.biz]. For a more detailed discussion see this stackexchange answer Understanding /dev and its subdirs and files. To learn about the underlying data structures refer to Chapter 4 of The Linux Kernel Module Programming Guide: Character Device Files [tldp.org]