Linux query command collection

In Linux, there are many query commands that can be used to obtain information on various aspects of the system, process, file, network, etc. The following are some common query commands and their detailed usage:

  1. manCommand - View help documentation for a command

    • usage:man [命令]
    • Example:man ls
  2. infoCommand - View information documentation for a command

    • usage:info [命令]
    • Example:info ls
  3. psCommand - View information about currently running processes

    • usage:ps [选项]
    • Example:ps aux
  4. topCommand - View system resource usage in real time

    • usage:top
    • Example: None
  5. dfCommand - View file system disk space usage

    • usage:df [选项] [路径]
    • Example:df -h
  6. duCommand - Estimate disk space usage of a file or directory

    • usage:du [选项] [路径]
    • Example:du -sh /home
  7. lsCommand - List files and subdirectories in a directory

    • usage:ls [选项] [路径]
    • Example:ls -l
  8. findCommand - Find a file or directory in a specified path

    • usage:find [路径] [选项] [表达式]
    • Example:find /home -name "example.txt"
  9. whichcommand - displays the full path of the command

    • usage:which [命令]
    • Example:which gcc
  10. whereisCommand - Shows the location of binaries, source code, and help pages

    • usage:whereis [命令]
    • Example:whereis python
  11. grepCommand - Search a file for a matching text pattern

    • usage:grep [选项] [模式] [文件]
    • Example:grep "error" logfile.txt
  12. wgetCommand - download files or web pages to local

    • usage:wget [选项] [URL]
    • Example:wget https://example.com/file.zip
  13. pingCommand - Test connectivity to host

    • usage:ping [选项] [主机名或IP地址]
    • Example:ping google.com
  14. tracerouteCommand - Display the network path of a packet from source to destination

    • usage:traceroute [选项] [目标]
    • Example:traceroute google.com

The above are just some common query commands. There are many other powerful query commands available in Linux. You can use manthe command to see the complete usage and options of the command.

Supongo que te gusta

Origin blog.csdn.net/m0_55877125/article/details/132847258
Recomendado
Clasificación