File type, attributes, and permissions in CentOS 6.6
1. File Types in the system.
Type:
① 'D' indicates the directory file,
dr-xr-xr-x.
5
rootroot
1024
2
Month
27
00
:
15
boot
'D' in 'Dr-xr-x. 'indicates that this file is a directory file.
② '-' Indicates a common file,
-Rwxr-xr-x.1rootroot23408 August 12: 45 arch
'-' In '-rwxr-xr-x.' indicates that this file is a normal file.
③ 'B' indicates the block device file,
Brw-rw ----. 1rootdisk7, February 28 04: 23loop0
'B' in 'brw-rw ----. 'indicates that this file is a block device file.
④ 'L' indicates the linked file,
Lrwxrwxrwx.1rootroot4 October 00: 13
awk
->
gawk
'L' in 'lrwxrwxrwx. 'indicates that this file is a linked file.
⑤ 'C' indicates the character file,
Crw-rw ----. 1rootvideo10, 1752 month 2804: 23 agpgart
'C' in 'crw-rw ----. 'indicates that this file is a character file.
Ipvs' indicates the socket file,
Srw-rw-. 1rootroot February 28 04: 23rpcbind. sock
'S' in 'srw-rw-. 'indicates that this file is a socket file.
Ii. file attributes and permissions
Example:
[root@mylinux/]
#ls-ldev-d
Drwxr-xr-x.16rootroot356 August 04: 23dev
In this section, except 'dev' indicates the file name, other information is called the attributes of this file. 'R' indicates reading, 'w' indicates modifying (writing), and 'x' indicates executing.
The 'drwxr-xr-x' section is divided into 10 character segments,
The ① character segment. As mentioned above, 'D' indicates the type of the file, which is a directory file.
The ②-④ character segment, that is, 'rwx 'indicates the permissions of the owner (user) on the file,
The ⑤-7th character segment, that is, 'r-x' indicates the permissions of the user group to which the object belongs,
Character segment 'r-x' indicates the permissions of other users (other) on files.