On Gentoo, what the first character in a linux file permissions drwxrwxrwx means:
The first character gives you a hint of the type of object it is.
Possible values for that first character: ( -, d, c, l, p, s, b, D )
- (dash) means file and and d means directory.
el@angeliqe ~/tmpdir $ mkdir my_empty_directory el@angeliqe ~/tmpdir $ touch myfile.txt el@angeliqe ~/tmpdir $ ls -al total 16 drwxrwxr-x 3 el users 4096 Dec 21 13:06 . drwx--x--x 9 el users 4096 Dec 21 11:47 .. drwxrwxr-x 3 el users 4096 Dec 21 11:54 my_empty_directory -rw-rw-r-- 1 el users 182 Dec 21 11:45 myfile.txt
my_empty_directory has a 'd' and is a directory, and myfile.txt has a '-' and is a normal text file.
c means character device file
el@angeliqe /dev $ ls -al total 4 drwxr-xr-x 12 root root 4080 Dec 19 21:18 . drwxr-xr-x 20 root root 4096 Nov 3 19:00 .. crw-rw---- 1 root tty 7, 133 Nov 24 10:13 vcsa5
vcsa5 is a character device file. Find character device files with this command: find / -type c -print 2>/dev/null
b means block device
el@angeliqe /dev $ ls -al total 4 drwxr-xr-x 12 root root 4080 Dec 19 21:18 . drwxr-xr-x 20 root root 4096 Nov 3 19:00 .. brw-rw---- 1 root disk 8, 0 Nov 24 10:13 sda
sda is a block device. Find block device files with this command: find / -type b -print 2>/dev/null
l means link
el@angeliqe ~/tmpdir $ touch myfile.txt el@angeliqe ~/tmpdir $ ln -s myfile.txt myfile2.txt el@angeliqe ~/tmpdir $ ls -al total 8 drwxrwxr-x 2 el users 4096 Dec 21 13:23 . drwx--x--x 9 el users 4096 Dec 21 13:22 .. -rw-rw-r-- 1 el users 0 Dec 21 13:23 myfile.txt lrwxrwxrwx 1 el users 10 Dec 21 13:23 myfile2.txt -> myfile.txt
myfile2.txt is a symbolic link to myfile.txt. Find symbolic link files with this command: find / -type l -print 2>/dev/null
p means named pipe
el@angeliqe /dev $ ls -al total 4 drwxr-xr-x 12 root root 4080 Dec 19 21:18 . drwxr-xr-x 20 root root 4096 Nov 3 19:00 .. prw------- 1 root root 0 Nov 24 10:13 initctl
initctl is a named pipe. Find pipe files with this command: find / -type p -print 2>/dev/null
s is a socket
el@angeliqe /dev $ ls -al total 4 drwxr-xr-x 12 root root 4080 Dec 19 21:18 . drwxr-xr-x 20 root root 4096 Nov 3 19:00 .. srwxrwxrwx 1 root root 0 Nov 24 10:13 gpmctl
gpmctl is a socket. Find socket files with this command: find / -type s -print 2>/dev/null
D means door
None found on my Gentoo.