Table of Contents
When UNIX is waiting for the user to enter a command, it displays what we call the UNIX prompt. The prompt is a sequence of characters on the video display (possibly a shell window) which is really a request from the operating system to the user to enter another command. A typical UNIX prompt could be
algol{~}% _When you look at your screen, you will see the name algol replaced by the name of the machine (or host) you are using. The value between the braces ({}) is the directory that you're currently in. The tilda (~) means that you are in your home directory. When a prompt appears on the screen you will also see an insertion point one space past the % sign. When you type a command this insertion point is where the characters will appear (the ‘_’ represents the insertion point. For example:
algol{~}% date_To issue a date command, you press the Return key. If that were done in the previous example, you would see on your screen something similar to the following:
algol{~}% date
Mon Jul 26 09:58:44 EDT 2004
algol{~}%Notice that the next prompt appears automatically when the last command has completed.
In UNIX, it is important to remember that the commands are usually in lower case letters. Therefore, ‘date’ works but ‘DATE’ does not! We say that UNIX is case sensitive. Try both ‘date’ and ‘DATE’.
hostname{~}% DATE
DATE: Command not found.
hostname{~}%Some commands have options that are specified by a minus sign followed by characters. For example, ‘date’ may have the ‘-u’ option that displays universal time or Greenwich Mean Time.
hostname{~}% date -uIf you spell the command name correctly but supply an improper option, an improper argument or the wrong number of arguments, many of the commands will not give you an error message but only display a brief description of usage. The command assumes you mistyped something and need some assistance. Try an incorrect option for date and you will see an example of a usage message:
hostname{~}% date -p
date: illegal operation --p
usage: date [-u] mmddHHMM[[cc]y]
date [-u] [+format]
date -a [-]sss[.fff]If you ever receive a ‘usage’ message, you typed something wrong. In a usage description, the square brackets ‘[ ]’ means that part is optional. Obviously from date's usage message, it allows several other features.