UNIX Guide, for beginners and Mac OS X users
You are here: SillyDog701 > UNIX Guide >SillyDog701 > UNIX Guide > Command > supportSupport - ask in our friendly forums.

Examples of commands

To enter a simple command:

   ls

This command lists the contents of the current directory. In this example, no options or arguments are used.

To enter a command together with one of its options:

   ls -l

The -l option changes the way the ls command works. This command produces a listing of the contents of the current directory in a long format.

To enter a command together with several options and an argument:

   lpr -Pps5 -#3 -m foo.c

The option -Pps5 specifies that the file foo.c is to be printed on printer ps5. The option -#3 specifies that 3 copies of the file are to be printed. The option -m requests that a mail message is sent to the user once the command has been completed.

To enter a command with several arguments:

   lp part1 part2 part3

This will print the files part1, part2 and part3 on the default printer.

To enter a command using a regular expression as an argument:

   rm -i [pP]*.ps

This will prompt the user if they want to remove any file whose name matches the regular expression [pP]*.ps. This will remove a file with the name part1.ps and the file Personnel.ps.


[Home]UNIX Guide home | [Search]search | index
Page URL: http://sillydog.org/unix/
[SillyDog701] [Netscape] [MozInfo701] [MacCentre701] [UNIX Guide] [AntTunes701][Forums] [Search] [Change Log] [Feedback] [About Us] [Sitemap]
This UNIX Guide maintained by SillyDog701, portion of this Guide is based on UNIXhelp. UNIXhelp is copyright University of Edinburgh. This page was last modified on 14 March, 2006
Netscape NOW!Made on a Mac
support MozInfo701 and SillyDog701