Simple command implementation for Linux beginners (3)

Continue to the second part of Linux basic command learning.

  1. The mkdir command
    creates a new directory. As shown in the figure, create a test directory under the tmp path.
    Insert picture description here
  2. The rmdir command
    deletes empty directories.
    Insert picture description here
  3. 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
    Insert picture description here
  4. 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
    Insert picture description here
  5. tac command The
    file content is displayed from the last line
    Insert picture description here
  6. nl command
    display line number
    Insert picture description here
  7. head command to
    remove the first few lines of the file
    Insert picture description here
  8. The tail command
    takes a few lines after the file
    Insert picture description here
Published 7 original articles · Like1 · Visits 368

Guess you like

Origin blog.csdn.net/qq_43337384/article/details/105657809