absolute path and relative path
Absolute path: The full path from/start to the file location. This path allows you to access the file, regardless of the directory you are currently in. (absolute paths are generally used in scripts to facilitate migration)
Relative path: Not from/start, which is the path starting from the current directory.
PWD: View the directory that is currently located.
CD command (change directory)
CD directory: Go to a directory.
CD-: Go back to the same directory you were in.
CD: Return to the home directory of the logged-in user.
CD ~: Ibid.
Cd.. : Go back to the top level directory. (If the command is hit/down, it will still stay in/down, because/is the top-level directory)
Cd. : Stays in the current directory.
mkdir command
mkdir directory: Create a new directory.
Mkdir-p Directory 1/directory 2: Recursively create directory (directory 1 does not exist, the actual process is to create directory 1 and then create directory 2)
MKDIR-PV Directory 1/directory 2: Recursively create directories and visualize them.
RmDir Empty directory: Delete an empty directory.
Touch files: Create a new file or update the timestamp of the file (you need to add the corresponding option).
Stat file: View the time properties of a file.
RM command (REMOVE)
RM file: Deletes a file. (You will be prompted to confirm the deletion before deleting)
Rm-f file: Forcibly delete a file (without prompting).
Rm-r directory: Deletes a directory. (Prompt to confirm deletion)
RM-RF Directory: Forces a directory to be deleted. (not prompted)
RM-RFV Directory: Forces a directory to be deleted. (visualization)
RM after adding the-f option, regardless of the file or directory to be deleted does not exist, will not error, you need to pay attention.
Linux Basic Command One