WHEREIS COMMAND IN LINUX

 whereis command is used to find the location of the source/binary file of a command and manuals sections for a specified file in a Linux system. If we compare whereis command with find command they will appear similar to each other as both can be used for the same purposes but whereis command produces the result more accurately by consuming less time comparatively.


Syntax:


Example 1: Let%u2019s say, we want to find the location of apropos command then we need to execute the following command in the terminal:



Example 2: To find the location of lshw command.


Options:

-b: This option is used when we only want to search for binaries.

Example: To locate binary of a Linux command let%u2019s say gunzip.



-m : This option is used when we only want to search for manual sections.

Example: To locate man page of false command.



-B: This option is used to change or otherwise limit the places where whereis searches for binaries.

Example: To locate binary of lesspipe in the path, /bin.



-M: This option is used to change or otherwise limit the places where whereis searches for manual sections.

Example: To check the man page of intro that is only in a specific location i.e. /usr/share/man/man1.



-S: This option is used to change or otherwise limit the places where whereis searches for sources.

Example: To Find all files in /usr/bin which are not documented in /usr/man/man1 with source in /usr/src.



-V: Displays version information and exit.



-h: Displays this help and exit.

Comments

Popular posts from this blog

OOP Assignment 3 helping materials

Square root Algorithm in C++

OOP lab 7 task solution