Unix shell-01 File

Source: Internet
Author: User

There are three methods to access a file:

1. Read. The content of this file can be displayed.

2. Write, delete or edit the file.

3. Run a shell script or program

 

Users of files can be divided into three types:

1. File owner, that is, the creator of the file.

2. users in the same group, that is, any user in the group that owns the file

3. Other users do not belong to a user in the user group that owns the file.

 

1.1 files

When creating a file, the system will save all information about the file:

1. File Location 2. File Type 3. file length 4. Which User owns the file and which user can access the file

5. I node 6. File modification time 7. File Permission bit

Ls-l command:

Total 4232 shows the space occupied by all files in this directory

-Rwxr-XR-X File Permission bit. Except the first slash, which is followed by 9 digits, three groups of permissions are required.

Rwx file owner User Permissions

R-X contains three user permissions in the same group

R-x the last three permissions of other users

1 indicates the number of hard links to the file

Root owner of the file

Default group (also called root) where the root file owner and root are located)

3756 indicates the length of the file in bytes, not K bytes! Only bytes!

Oct 14 file update time

Dmesg file name

Related Article

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.