How to use Linux whatis command

How to use Linux whatis command

01. Command Overview

The whatis command searches for keywords in some special database files containing brief descriptions of system commands and sends the results to standard output. The searched content must completely match the keyword to be output. The whatis database files are created using the /usr/sbin/makewhatis command.

02. Command format

whatis [OPTION…] 關鍵詞…

03. Common options

Usage: whatis [OPTION...] Keywords...

 -d, --debug output debugging information -v, --verbose output detailed warning messages -r, --regex interpret each keyword as a regular expression -w, --wildcard include wildcards in keywords -l, --long do not truncate output to terminal width -C, --config-file=FILE use this user configuration file -L, --locale=LOCAL define the locale to use for this search -m, --systems=SYSTEM use manual pages from other systems
 -M, --manpath=path Set the search path for manual pages 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 examples

[deng@localhost ~]$ whatis ls
ls (1) - list directory contents ls (1p) - list directory contents

[deng@localhost ~]$ whatis cp
cp (1) - copy files and directoriescp (1p) - copy files

[deng@localhost ~]$ whatis chown
chown (1) - 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 online man pages 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:

[root@localhost ~]# makewhatis

Note: Centos7.5 does not currently support this command.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Linux whatis and whatis database usage and query methods (man usage examples)

<<:  mysql backup script and keep it for 7 days

>>:  jQuery implements nested tab function

Recommend

Understanding MySQL clustered indexes and how clustered indexes grow

In this note, we briefly describe What is the B+T...

Implementation of css transform page turning animation record

Page turning problem scenario B and C are on the ...

Two ways to make IE6 display PNG-24 format images normally

Method 1: Please add the following code after <...

Detailed explanation of setting up DNS server in Linux

1. DNS server concept Communication on the Intern...

XHTML Tutorial: The Difference Between Transitional and Strict

In fact, XHTML 1.0 is divided into two types (thr...

Complete steps to install boost library under linux

Preface The Boost library is a portable, source-c...

How to use axios to make network requests in React Native

In front-end development, there are many ways to ...

About WeChat Mini Program to implement cloud payment

Table of contents 1. Introduction 2. Thought Anal...

Docker installation and configuration command code examples

Docker installation Install dependency packages s...

How to use MySQL stress testing tools

1. MySQL's own stress testing tool - Mysqlsla...

Solve the problems encountered when installing MySQL 8.0 on Win10 system

The problems and solutions encountered when insta...

Common usage of regular expressions in Mysql

Common usage of Regexp in Mysql Fuzzy matching, c...

Understand the implementation of Nginx location matching in one article

Since the team is separating the front-end and ba...

Detailed explanation of MySQL execution plan

The EXPLAIN statement provides information about ...