Command-Line Conventions

The general conventions used for most UNIX commands are as follows:

$ command_name [-options] [arg1 [arg2 [argn]]]
					

The square brackets indicate optional item zones on the command line. Options immediately follow the command name and begin with a hyphen. Each option consists of a single character—usually a letter but possibly a number or another character. When used, arguments follow the options. The number of valid arguments is determined by the command being invoked. An example of a typical UNIX command is as follows:

$ rm -f core
					

The option shown is specified by the hyphen and the letter f. The option -f is then followed by one argument, the filename core in this case.

Using Multiple Options

There can be several ...

Get Advanced UNIX Programming 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.