nerdexam
LPI

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.

Finding Your Way on a Linux System

Question

Most commands on Linux can display information on their usage. How can this information typically be displayed?

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)
  • A
    5% (2)
  • B
    3% (1)
  • D
    89% (33)
  • E
    3% (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.

ABy running the command with the option /?? or /??.

The `/?` option is a Windows CMD/PowerShell convention and is not recognized as a help flag by Linux commands.

BBy running the command with the option ?! or ?=!.

`?!` and `?=!` are not valid or recognized option conventions on any standard Linux command.

CBy running the command with the option /doc or /documentation.

`/doc` and `/documentation` use Windows-style forward-slash option syntax and are not valid Linux command options.

DBy running the command with the option -h or --help.Correct

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.

EBy running the command with the option -m or --manpage.

`-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

#command help#--help option#command syntax#documentation

Community Discussion

No community discussion yet for this question.

Full 010-160 Practice