![]() |
Computer Systems Lab CS1000 |
![]() Wiscinfo |
![]() CS Home |
![]() CSL |
![]() CS1000 |
![]() Feedback |
To run a program you merely type in its name. Many programs accept further information on the command line which modify their behavior. Most commands take arguments, and sometimes commands have several options (or parameters) available. Most often they are in the arrangement of
command [-parameters] argument1 argument2 ...
The brackets around the parameters indicate they are optional. For example, if you want to see the contents of the current directory, the ls command is used.
vega1% ls
But if you want to view the contents of your public directory while in your home directory, the directory name, public, must be supplied as an argument.
vega1% ls public
Many programs also accept flag parameters, indicated with a preceding minus sign, which change the way the program works. These options generally precede other arguments, but this is not always the case. It depends on the the specific program you are using. For example, ls doesn't display all the information known about files in a directory. However, if the -l option is given, then more information is displayed.
vega1% ls -l
Like most commands, ls takes many different parameters, which can be combined together to yield various effects. Unfortunately, there is very little consistency in how different options are interpreted. To some programs, -s might mean one thing, but to others it probably means something completely different. You should always consult the manual page on the specific program you wish to run for exactly what the various flags do.