Format of UNIX Commands
Syntax of UNIX Commands
UNIX commands can be very simple one word commands or they can take a number of additional arguments
(parameters) as part of the command. In general a UNIX command has the following general form...
command options(s) filename(s)
Lets look at each of these parts a bit more closely...
- The command is the name of the utility or program that we are going to execute.
- The options are passed into the command to modify the way the command works. It is typical
for these options to have be a hyphen followed by a single character, such as-l.
It is also a common convention under Linux to have options that are in the for of 2 hyphens
followed by a word or hyphenated words, such as --color or --pretty-print.
- The filename is the last argument for a lot of UNIX commands. It is simply the file or files that you want
the command to work on. Take note that not all commands work on files, such as ssh which takes the name of a host
as its argument.
Common UNIX Conventions
- In UNIX the command is almost always entered in all lower case characters.
- Typically any options come before filenames.
- Many times individual options may need a word after them to designate some additional meaning to the command.
Daniel J. Hood
Last modified: Wed Jan 8 12:50:15 EST 2003