whatis
Overview
The whatis
command displays one-line manual page descriptions. It’s useful for quickly finding out what a command does without reading the full manual page.
Syntax
whatis [options] name ...
Common Options
Option | Description |
---|---|
-d |
Debug mode |
-v |
Verbose mode |
-w |
Match whole words only |
-r |
Use regex for matching |
-l |
List format output |
-s section |
Search only specified sections |
-m system |
Search alternate system |
--long |
Don’t trim output to terminal width |
Key Use Cases
- Quick command reference
- Command discovery
- Brief command descriptions
- Manual section lookup
- Command verification
Examples with Explanations
Example 1: Basic Usage
whatis ls
Show description of ls command
Example 2: Multiple Commands
whatis cp mv rm
Show descriptions for multiple commands
Example 3: Regex Search
whatis -r '^zip.*'
Find all commands starting with ‘zip’
Understanding Output
Format:
command (section) - description
Example:
ls (1) - list directory contents
Common Usage Patterns
Check command purpose:
whatis command
Find related commands:
whatis -w "*pdf*"
Search specific section:
whatis -s 1 command
Performance Analysis
- Fast command lookup
- Database-driven searches
- Regular expression support
- Section-specific searches
- Multiple command lookup