Author's Foreword
Welcome little cuties to come and learn from my gtiee Qin Boss (qin-laoda) - Gitee.com
————————————————————————————————————
Table of contents
file information
file permissions
grant of authority
——————————————————————————————
Insert some little knowledge
1. cd .. can return to the previous directory or direct cd can also return to the previous directory
2. ..represents the directory of the previous layer .represents the directory of the current layer
file information
Some cuties in the last blog will find that there are many output contents when using the command ls -l, some cuties may not understand, I will introduce a little bit below
Some cute people will find that color fonts can distinguish directories and files, and they will mess up. When creating folders and files, they will sometimes add a suffix and sometimes not. In principle, it is possible, but we will increase a lot when we are looking for files. Difficulty, so it is generally believed that files have suffixes, but folders do not. This is the potential rule
Below I will dissect it a little bit
file name
These are the file and directory names
file creation time or modification time
file size
When we use ls -hl, it will convert the qualified ones into units of k
owner and peers
It can be seen that there are two columns of different colors. The green one is the name of the creator (ourself), and the red one is the name of the same group (team).
number of paths
These numbers represent how many paths the file you are looking for can be found
permissions
These are the permissions, and I will focus on this below to explain
To understand this, you need to understand what these mean
r ------- read
w ------------Modify
x ------------- execute
grant of authority
1. Common law
u-------- represents the owner
g ---------Represents the same group
o ---------- on behalf of someone else
+ -----------Increase
- --------------reduce
= ------------modified to
Next we will introduce a command chmod
In the above picture, I take the permission of modifying the a directory as an example
Use = to modify
It can be seen that it is directly modified to, not increase and decrease
The above method may be a little cute and I can’t remember it, so let me introduce the second method
digital method
r ------------4
w ---------------2
x -----------------1
- ------------------0
chmod 777 a The position of the first 7 represents u The position of the second 7 represents g The position of the third 7 represents o
7 =4+2+1 which is r+w+x
Summarize
The above is the relevant information of the file I introduced, if you don’t understand, you can chat with me in private