Unix Command Basics


You work with Unix by typing commands in a Terminal window at the shell prompt. Press after each command to enter it. The results of the command entry appear in the Terminal window, followed by a new shell prompt.

Most Unix commands can be used with options that make them do slightly different things. For instance, the ls command has 35 options in Mac OS X. To include an option with a command, enter the command followed by a space, a hyphen, and the option. For example, to use the l option with the ls command, you'd enter ls -l.

You can use more than one option at a time by stringing them together. Some commands, such as ls, let you put all the options together after a single hyphen. Other commands require that you use a separate hyphen for each option.

Tips

  • Typing commands in a command-line interface (CLI) offers advantages beyond what is possible with a graphical user interface (GUI) such as the Finder.

  • If, while working with Unix commands in the Terminal window, you are either flooded with output that you'd like to stop or faced with a command that seems stuck, try pressing to break the current command. If that doesn't work, close the Terminal window and open a new one.

  • Throughout this chapter, an ellipsis () in command syntax means that you can repeat the previous operand as many times as you wish. For instance, rather than saying cp source-file1 source-file2 source-fileN target-directory, I'll say cp source-file … target-directory, meaning that you can include as many source files as you like in the command.




Visual QuickStart Guide. Mac OS X 10. 4 Tiger
Mac Os X 10.4 Tiger (Visual Quickstart Guides)
ISBN: 0321423372
EAN: 2147483647
Year: 2003
Pages: 301
Authors: Maria Langer

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net