i looked up in whole root directory but i didn't understand one thing what does orange color in dev directory mean? i know its directory for system devices but i didn't understand the c in ls -l permission section and what type of file is that? this data file is that used by HAL to read and recognize system devices? this is the screenshot of terminal
-
What does the first character of UNIX mode string indicate?– steeldriverMay 25, 2020 at 19:14
-
To start with, which Linux distro have you installed (Ubuntu server, Ubuntu desktop, Kubuntu, Lubuntu, Xubuntu, Ubuntu MATE, Mint, et al.), & which release number? Different releases have different tools for us to recommend. Please click edit & add that to your question, so all facts we need are in the question. Please don't use Add Comment, since that's our one-way channel to you. All facts about your PC should go in the Question with edit as this is a Q&A site, not a general forum, so things work differently here.– K7AAYMay 26, 2020 at 17:15
1 Answer
The explanation is found on Stack Overflow.
Not just for Ubuntu but for all distros (as far as I understand) that its a character special file. I have linked the source or the information from stack overflow below.
https://stackoverflow.com/a/23236028/879882
It's a character-based (as opposed to block-based) device file.
Blocked-based devices are anything where it makes sense to transfer data in (surprisingly enough) blocks. By that, I mean things like disks.
Character-based devices (and again, this should come as no surprise) tend to transfer characters at a time. Things like terminals, serial ports, printers and so on.
If you're running a decent Linux distro, that information (plus more than you could probably ever need) can be obtained with the command:
info ls
which contains this little snippet: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
Also if you man ls
from a command line will bring up the text manual for ls with more details or Google man ls
for a webpage version.