File system:
The file is divided into two parts:
Metadata: Describing the properties of a file
Data: The contents of a file
Hierarchical addressing methods:
In the file system, file access is based on the file name, which is referenced by name.
In the file system, there are a series of rules for file names;
1. The file name cannot contain "/" characters;
"/": Represents the root filesystem; the so-called root file system, which is the original starting point for Linux files;
"/": Indicates the delimiter of the path;
2. The file name cannot exceed 255 characters in length;
3. In the same location, the file name cannot be reused;
4. File names are strictly case-sensitive; (Linux systems are case-insensitive, case-sensitive file systems)
The file system uses the concept of a path to identify the location of the file: The path is the set of hierarchy of directories that must go through when locating a file location;
The path in the file system is described in the following way:
Absolute path:
Everything starts with "/" to find the path;
Relative path:
Everything starts with the "Current working directory" to find the path;
“.” : Indicates the current working directory;
“..” : Represents the parent directory of the current working directory (top level directory);
So it can also be said that everything with "." or ".." The path to start looking for is called the relative path, and when you use "." When the current working directory is represented, it can be omitted;
How do I select a path? Select relative path or absolute path?
If the target file and the current directory are not on the way, the absolute path is used, if the relative path is used;
By the way: the current working directory is included in the absolute path;
Home directory:
The default current working directory for each user who logs on to the system, and the starting directory for each user;
Also known as "Home Directory"
Either path is actually a two-part composition:
The base name of the file:
BaseName
Directory name of the file:
DirName
This article from "13366421" blog, declined reprint!
Linux file system