Command Line Syntax

The command line is accessed by typing a command followed by command options or arguments. Commands may be basic UNIX instructions (listing a directory, copying a file, etc.) or may invoke a program. Arguments can take the form of file names, directory names, or other specifications, depending on the particular command used. In general, command options are specified by a dash (-) followed by a single character (denoting the option) then occasionally followed by further specifications according to the particular option. Always make sure that you include a space between the command and its options or arguments and include spaces (or, in certain cases, other special characters) between each option or argument. See UNIX Power User Tips below, for tips on how to make the command line work faster and more efficiently. These syntax forms are illustrated below;

[command]

Executes given command with no options or arguments. The command must be located in the search path, defined by the c-shell (see Modifying the .cshrc File section below) or be specified with a complete pathname (e.g. /usr/people/mcdermoj/progs/cool_command).

[command] —[option]

[command] [argument]

[command] —[option] [argument]

Executes given command with specified option(s), argument(s), or both. A common argument is a file (or other similar target) that the command is then performed on.

[command] —[option][option arguments]

Executes the specified command with the given option and an argument related to that option.

Syntax for each command can generally be obtained from its manual page (man for short) by the following command;

man [command name]

man cd

Returns (prints out) the manual page associated with the command. This will generally include command syntax, options, arguments, examples of use and potential problems using the command.