010-100 · Question #83
Which command line can be used to search help files that mention the word "copy"?
The correct answer is A. man -k copy. 'man -k' performs a keyword search across all manual page names and short descriptions, equivalent to the 'apropos' command.
Question
Which command line can be used to search help files that mention the word "copy"?
Options
- Aman -k copy
- Bwhatis copy
- Cman copy
- Dcopy help
- Ecopy --help
How the community answered
(28 responses)- A82% (23)
- C11% (3)
- D4% (1)
- E4% (1)
Why each option
'man -k' performs a keyword search across all manual page names and short descriptions, equivalent to the 'apropos' command.
The 'man -k copy' command searches the whatis database for any manual page whose name or description contains the word 'copy', returning a list of matching commands and their brief descriptions. This is the standard way to discover commands related to a concept when the exact command name is unknown.
'whatis copy' displays only the one-line description for a command named exactly 'copy', and does not search across all man pages for keyword matches.
'man copy' attempts to open the man page for a command specifically named 'copy', rather than searching all pages for the keyword.
'copy help' is not a valid Linux shell command; 'copy' is a Windows command and does not exist natively in Linux.
'copy --help' is not valid because 'copy' is not a standard Linux command, so no --help flag exists for it.
Concept tested: Searching manual pages with man -k (apropos)
Source: https://man7.org/linux/man-pages/man1/man.1.html
Topics
Community Discussion
5A is correct. "man -k copy" runs a keyword search across all manual page summaries, which is exactly what you want when you know a concept but not the specific command name, and that behavior is what the exam will test you on. Burn a card for "man -k = keyword search across man pages" and contrast it with "whatis" (option B), which only works if you already know the exact command name.
man -k and whatis actually pull from the same database so if that database is stale you will get bad results from both, worth running mandb to refresh it before you trust either one in a real troubleshooting session.
A lot of people grab B first because whatis copy sounds like it should work, but whatis just shows you a one-line description of a command named exactly "copy," it does not search across all man pages for that keyword. Man -k copy is the one that does the keyword search through all the help files and gives you everything that mentions "copy" in the description, which is exactly what the question is asking for.
Yep, and if whatis copy returns nothing or "nothing appropriate," that is actually a hint that no command is named exactly "copy" on that system, which reinforces why man -k is the right move for discovery.
man -k copy is the one you want here, because the -k flag does a keyword search across all man page descriptions rather than pulling up a specific command's manual. Quick lab to cement it: open any Linux terminal, run man -k copy, then run man copy, and tell me what difference you notice in the output between those two approaches.