9.
CHAPTER 18 Managing Files, Volumes, and Drives 390
FIGURE 18.9 Using which.
When working with system commands, you can also use the whereis utility. Let??™s explore
this command next.
Using whereis
Like which, the whereis utility is used to find the location in the file system where system
commands reside. However, it can return much more information about the file than
which can. It not only returns the location of the file, but also the location of the man
page file and the source code file (if it exists).
The syntax for using whereis is relatively straightforward. Enter
whereis command
For example, if you wanted to get information about the rm command, you would enter
the following:
whereis rm
The whereis utility then returns the relevant data, as shown in Figure 18.10.
FIGURE 18.10 Using whereis.
If you want to limit the output provided by whereis, you can use the following syntax:
whereis option command
The options you can use include the following:
. -b??”Returns only the location of the command in the file system.
. -m??”Returns only the name and location of the command??™s associated man page
files.
Pages:
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798