What happens when a program executes?



Last revision August 6, 2004

Table of Contents:
  1. Shell interpretation
  2. Editing command lines
  3. Stuck in a Unix login session?
  4. Program execution
  5. Simple commands
  6. Unix command syntax
  7. Controlling processes
  8. Your login environment

Unix is very terse. The general rule is that the program simply does its job without any explanatory responses to the screen. If it succeeds, you just get another shell prompt.

Programs that generate output to the terminal, such as a listing of files in your directory, often do not print any explanatory headers. The philosophy of Unix is that you output only the actual data, so that it can be further processed by other programs that then do not have to worry about header formats. Consequently, for most programs, you have to look at the on-line documentation to learn how to interpret the output.

If the program cannot complete, it usually puts out a cryptic one-line error message. Try looking up the description of the command in the Programmer's Manual. Unfortunately, there is no master index of error messages, like IBM mainframes or VMS.

A command that wants more input (like mail) just puts the cursor to the next line and waits for you to type. Usually, there is no prompt character. When you are done typing input, you signal end of input by pressing CTRL-D by itself on a new line.

Unix input for command-line programs like mail is like an old-fashioned typewriter: you should press the RETURN key at the end of each line. Typed information will be wrapped around if it is too long for the line, but unlike Macintosh and many PC programs, it will not be neatly broken at a word boundary. Also, the maximum number of characters that will be wrapped around is limited, generally to 255 characters. So remember to use that RETURN key at the end of each input line.

<--Previous Overview Next-->

Comments or Questions?