Linux easy (forgotten) shortcut command summary

  1. xrandr: view supported resolutions
  2. xrandr -s xxxxx: set resolution
  3. The header file uses <> to indicate that the header file is found in the /usr/include or /usr/local/include directory by default, and "" means to search in the current directory first, and if not found, go to the above directory to find it.
  4. ./a.out 10 >>test.ret.txt & write a test file, enter the number of runs 10, print the result and append it to test.ret.txt, & means running in the background, and return the pid number
  5. grep "struct sockaddr_in{" * -nir means to find the required content in the current path, n means to print the line number, i means case insensitive, r means recursive
  6. The .sh file is equivalent to an executable, command-line script file.
  7. Find a specific file, use find and grep together, find|grep XXX approximate path -nir
  8. file xxx: view the properties of the file
  9. -I : specify the header file directory
  10. -L: Specify the library file directory
  11. uname -r: View system version
  12. du View file size
  13. md5sum: View the value of md5 and compare to ensure that the file is not damaged during copying
  14. df -T: View file system (Raspberry Pi)
  15. sudo mknod +name +major device number+minor device number: Manually generate devices
  16. tar xvf : decompress the .tar file
  17. chdir; change the current main program directory, system() changes the shell script directory, chdir should use an absolute path
  18. pgrep + XXX: match and print the specific pid number

Guess you like

Origin blog.csdn.net/weixin_48321071/article/details/124807859