Continue to the second part of Linux basic command learning.
- The mkdir command
creates a new directory. As shown in the figure, create a test directory under the tmp path.
- The rmdir command
deletes empty directories.
- The rm command
removes files or directories.
-f: Ignore files that do not exist, no warning message will appear
-i: Interactive mode, the user will be asked whether to move before deleting
-r: Recursive deletion
- The mv command
moves files or directories.
-f: If the target file already exists, overwrite it directly without asking
-i: If the target file (destination) already exists, you will be asked whether to overwrite
-u: If the target file already exists and the source is relatively new, it will be upgraded
- tac command The
file content is displayed from the last line
- nl command
display line number
- head command to
remove the first few lines of the file
- The tail command
takes a few lines after the file