Friday, December 23, 2011

Getting the help for commands on Linux

Most GNU utilities have a ––help option that displays information about the utility.

 

$ cat --help

Usage: cat [OPTION] [FILE]...
Concatenate FILE(s), or standard input, to standard output.
-A, --show-all equivalent to -vET
-b, --number-nonblank number nonblank output lines
-e equivalent to -vE
-E, --show-ends display $ at end of each line

...

If the information that ––help displays runs off the screen, send the output through the less pager (page 31) using a pipe:
$ ls --help | less

No comments:

Post a Comment