Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use whatis command in Linux system

Shulou Source: shulou.com Published: 2022-06-01 23:42:40 11月16日 Update

How can the whatis command be used in a Linux system? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.

01. Command Overview

The whatis command looks for keywords in specific database files that contain short descriptions of system commands and sends the results to standard output. The content of the search must exactly match the keyword before it is output. The whatis database file is created with the / usr/sbin/makewhatis command.

02. Command format

Whatis [OPTION...] Key words...

03. Common option

one

two

three

four

five

six

seven

eight

nine

ten

eleven

twelve

thirteen

fourteen

fifteen

sixteen

Usage: whatis [OPTION...] Key words.

-d,-- debug outputs debugging information

-v,-- verbose outputs detailed warning messages

-r,-- regex interprets each keyword as a regular expression

-w,-- wildcard keywords include wildcards

-l,-- long do not truncate the output according to the terminal width

-C,-- the config-file= file uses this user settings file

-L,-- the locale= region defines the locale used for this search

-m,-- systems= system use manual pages from other systems

-M,-- manpath= path sets the path of the search manual page to "path"

-s,-- sections= list,-- section= list

Search only these sections (colon-separated)

-help give this help list.

-- usage give a short usage message

-V-- version print program version

04. Reference exampl

one

two

three

four

five

six

seven

eight

nine

ten

eleven

twelve

thirteen

fourteen

fifteen

sixteen

seventeen

eighteen

nineteen

[deng@localhost ~] $whatis ls

Ls (1)-lists the contents of the directory

Ls (1p)-list directory contents

[deng@localhost ~] $whatis cp

Cp (1)-copy files and directories

Cp (1p)-copy files

[deng@localhost ~] $whatis chown

Chown (1)-modify the file owner and group

Chown (1p)-change the file ownership

Chown (2)-change ownership of a file

Chown (3p)-change owner and group of a file

[deng@localhost ~] $whatis man

Man (1)-formats and displays the online help man page

Man (7)-Macros for formatting man pages

Man (1p)-display system documentation

[deng@localhost ~] $

If you need to rebuild the database of information related to this command, execute the following command:

one

[root@localhost ~] # makewhatis

Note: Centos7.5 does not support this command at this time.

After reading the above, have you mastered how the whatis command is used in the Linux system? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Original link: https://blog.csdn.net/dengjin20104042056/article/details/95239198

Tags: Commands systems keys files output keywords content information manuals data databases formats paths operating systems keywords regions methods more users directories Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Shulou Information macOS Huawei Shulou Tech Info