␡
- Find Out About Commands with man
- Search for a Command Based on What It Does
- Quickly Find Out What a Command Does Based on Its Name
- Rebuild man's Database of Commands
- Read a Command's Specific Man Page
- Print Man Pages
- Learn About Commands with info
- Navigate Within info
- Locate the Paths for a Command's Executable, Source Files, and Man Pages
- Read Descriptions of Commands
- Find a Command Based on What It Does
- Find Out Which Version of a Command Will Run
- Conclusion
This chapter is from the book
Search for a Command Based on What It Does
man -k
With just a little training, you find that you can zoom around man pages and find exactly what you need...assuming you know which man page to read. What if you know a little about what a command does, but you don't know the actual name of the command? Try using the -k option (or --apropos) and search for a word or phrase that describes the kind of command you want to discover. You'll get back a list of all commands whose name or synopsis matches your search term.
$ man list No manual entry for list $ man -k list last (1) - show listing of last logged in users ls (1) - list directory contents lshal (1) - List devices and their properties lshw (1) - list hardware lsof (8) - list open files [Listing condensed due to length]
Be careful with the -k option, as it can produce a long list of results, and you might miss what you were looking for. Don't be afraid to try a different search term if you think it might help you find the command you need.