File type, attributes, and permissions in CentOS 6.6

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.