Command line syntax
Consider command: sort -f -r -o neat messy verymessy
sort is the command name.
-f -r -o neat are the options.
-o neat is an option whose argument is neat.
messy verymessy are the command operands or arguments.
The effect of this command is to concatenate the files messy and verymessy and then sort this data. The result is to be written in output file neat because we used the output option -o. Because -f was given, sort folds upper and lower case letters, that is, it ignores case; the -r indicates the output is to be in reverse order.
 
Syntax (from System V interface definition, 1985)
  • -- indicates the end of options (to allow use of - in command operands).
  • A single - means stdin.
  • -- when followed by something other than a blank introduces a multicharacter option and does not mean end of options. This is a GNU extension which allows for a wider variety of options and more meaningful names. For example, --help.
  • + is like - but inverts the meaning of the option (turn off instead of on). This is an extension which only some programs follow.
     
    Other notes
    In usage and man entries, [ ] means optional, | means or, ... means repeat, { } means grouping (consider as a unit).

    On many Unix systems, see also the start of intro(1): man -s 1 intro

    Last update: 2001 January 1