The Linux common actions (root, ls, history, pwd, touch, mkdir, tee, cp, rm, file, cd, cat, sort, head, tail, less, more, wc, stat, etc.)

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq_38358499/article/details/97817805
  1. Into the root directory:
  2. List all the contents of the specified directory:
  3. List all the contents of the specified directory and detailed information on the contents of the display:
  4. List all the contents of the specified directory and display hidden files:
  5. View history message documents:
  6. View the current working directory:
  7. Create a new file, empty file:
  8. Create a new directory, refers to the folder:
  9. Written content from the terminal to the specified file: finished after Ctrl + C to exit write
  10. Copy to copy the file or directory, use cp, if the file does not exist, the duplicate, if prompted to overwrite, and then copy
  11. To delete a file or directory, a directory can delete one or more files and directories:
  12. View types of files:
  13. Switch working directory specified:
  14. View the contents of the file: ; display number of each line, including blank lines, with -n: ; display number of each line, not including blank lines, with -b:
  15. To sort the contents of the file:
  16. Check the contents of the file header, the default number of lines -num look at the first 10 rows can be manually specified, you want to see:
  17. View file contents in the tail, just look after the default number of lines 10 lines, -num can manually specify needed to view:
  18. less: view the file, press enter to turn down one line, press the space bar a scroll down, press the down arrow key to turn up or down the line, and press the q exit, similar to man
  19. more: to view the file, the file contents when less time, and use exactly the same cat, the output content to the terminal; when the contents of the file more recommended to use more, by the spacebar and enter keys to control flip and turn the line
  20. The number of lines of a file, the file name and the number of bytes of information:
  21. View file details, access to file name, size, permissions, last access time and time Recent changes:
  22. Find data, you can find there:
  23. Value output terminal of the string or variable:
  24. Redirect>, the results will be redirected to a file, if the file exists, the contents of the file will be overwritten; if the file does not exist, create the file, and then redirect. As a result file will be directed to non-existent file d:
  25. >> output redirection, the results will be redirected to a file and display the contents stored in the terminal to the specified file, appended file contents. As the a.txt, b.txt, c d.txt redirected to a file:
  26. Linking files, the equivalent of shortcuts for Windows. [Link hard link can only regular files, directories can not link]: soft link: ln -s file link source file; soft link [do not take up disk space, delete the source files will fail soft link]: Hard link: ln source file link file
  27. Open a text editor for Linux:
  28. View the current time [date], to view the current calendar [cal], see ifconfig ip address connectivity [], [ping] detection network

Guess you like

Origin blog.csdn.net/qq_38358499/article/details/97817805