next up previous
Next: Wildcards Up: Shells Previous: PATH

Command Arguments

Many programs take options which modifies their behavior. Options typically begin with hyphen. Many packages now support both short (one-letter) and long options. Short options may be combined behind a single hyphen. Long options are preceeded by a double hyphen (-).

Command arguments (e.g., filenames) usually follow the options, if any.

So, what if a filename begins with a hyphen? The list of options is immediately terminated by a '- ' within the option list. So, you can delete the file '-trash' with a command like:
$ rm -- -trash or
$ rm ./-trash

Finally, many commands which take filename arguments will take the special filename `-' to mean standard input or standard output. For instance, $ tar cf - bad-jokes/ | sendmail reece@dasher.wustl.edu



Reece Kimball Hart
1998-03-18