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