Using the Linux whereis Command
The `whereis` command is used to locate the location of the executable file, source code file, and help document file for a specified command.
Use proper grammar.
whereis [选项] [命令名]
Common options include:
- -b: search only for executable files.
- -m: Only search for help documentation files.
- -s: Search only in source code files.
- u: search for files that do not contain a specified command.
Original: 我们需要尽快解决这个问题。
Paraphrased: We need to resolve this issue as soon as possible.
- Locate the command ls:
whereis ls
- Only search for executable files and help documentation files.
whereis -bm ls
- Search for files that do not contain the specified command.
whereis -u ls
It is important to note that the whereis command can only be used for commands that have already been installed, and does not work for user-defined scripts or commands.