010-160 · Question #82
Most commands on Linux can display information on their usage. How can this information typically be displayed?
The correct answer is D. By running the command with the option -h or --help. The standard convention on Linux for displaying a command's built-in usage information is to pass the -h or --help option.
Question
Options
- ABy running the command with the option /?? or /??.
- BBy running the command with the option ?! or ?=!.
- CBy running the command with the option /doc or /documentation.
- DBy running the command with the option -h or --help.
- EBy running the command with the option -m or --manpage.
How the community answered
(37 responses)- A5% (2)
- B3% (1)
- D89% (33)
- E3% (1)
Why each option
The standard convention on Linux for displaying a command's built-in usage information is to pass the `-h` or `--help` option.
The `/?` option is a Windows CMD/PowerShell convention and is not recognized as a help flag by Linux commands.
`?!` and `?=!` are not valid or recognized option conventions on any standard Linux command.
`/doc` and `/documentation` use Windows-style forward-slash option syntax and are not valid Linux command options.
Most Linux commands follow the GNU/POSIX convention of accepting `-h` (short form) or `--help` (long form) to print a brief usage summary to standard output. This is a widely adopted standard across utilities in the GNU coreutils and most third-party packages.
`-m` and `--manpage` are not standard options; to read a full manual page you use the separate `man` command, not an option passed to the command itself.
Concept tested: Standard Linux command help options -h and --help
Source: https://www.gnu.org/software/coreutils/manual/coreutils.html
Topics
Community Discussion
No community discussion yet for this question.