Getting Help from the Commands Themselves

There is one more common and useful method for obtaining help or documentation about a specific Linux command. Nearly every command supports either -h, -help, or --help as a special option that causes the command to print a brief help message and exit. Listing 18.1 shows one such help message.

Listing 18.1. Output of the rm --help Command
 Usage: rm [OPTION]... FILE... Remove (unlink) the FILE(s). -d, --directory unlink FILE, even if it is a non-empty directory (super-user only; this works only if your system supports `unlink' for nonempty directories) -f, --force ignore nonexistent files, never prompt -i, --interactive prompt before any removal --no-preserve-root do not treat `/' specially (the default) ...

Get SAMS Teach Yourself Red Hat® Fedora™ 4 Linux® All in One now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.