HP-UX Reference (11i v2 04/09) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
introduction(9) introduction(9)
intr ^? (DEL; Delete, Rub, Rubout) ^C
(ETX)
quit ^\ (FS)
start ˆQ (DC1; X-ON)
stop ^S (DC3; X-OFF)
The eof character terminates "file" input from the terminal, as read by programs and scripts. By exten-
sion, eof can also terminate the shell (see the Logging Out subsection above).
The
kill character deletes all characters typed before it on a terminal input line. The
erase character
erases the last character typed. Successive uses of
erase will erase characters back to, but not beyond,
the beginning of the input line.
The
intr character generates an interrupt signal that bypasses the input buffer. This signal generally
causes whatever program you are running to terminate. It can be used to stop a long printout that you
don’t want. However, programs can arrange either to ignore this signal altogether, or to be notified when
it happens (instead of being terminated). For example, the
vi editor catches interrupts and stops what it
is doing, instead of terminating, so that an interrupt can be used to halt an editing operation without los-
ing the file being edited.
The
quit character generates a quit signal that bypasses the input buffer and most program traps and
causes a running program to terminate. It can cause a core dump in the current directory.
The
stop character can be used to pause output to the terminal. It is commonly used on video terminals
to suspend output to the display while you read what is already being displayed. You can then resume
output by typing the start character. When stop and start are used to suspend or resume output,
they bypass the keyboard command-line buffer and are not passed to the program. However, any other
characters typed on the keyboard are saved and used as input later in the program.
The
eof, erase, and kill characters can be used as normal text characters if you escape them with a
preceding \,asin\ˆD. Therefore, to erase a \, you need two
erases.
The
intr, quit, start, and stop characters cannot be escaped on the input line.
End-of-Line and Tab Characters
Besides adapting to the speed of the terminal, HP-UX tries to be intelligent as to whether you have a ter-
minal with a newline (line-feed) key, or whether it must be simulated with a return/line-feed character
pair. In the latter case, all incoming return characters are changed to line-feed characters (the standard
line delimiter), and a return/line-feed pair is echoed to the terminal. If you get into the wrong mode, use
the
stty command to correct it (see stty (1)).
Tab characters are used freely in HP-UX source programs. If your terminal does not have the tab func-
tion, you can arrange to have tab characters changed into spaces during output, and echoed as spaces
during input. The
stty command sets or resets this mode. By default, the system assumes that tabs are
set every eight character positions. The tabs command (see tabs (1)) can set tab stops on your terminal,
if the terminal supports tabs.
How to Run a Program
When you have successfully logged into HP-UX, the shell monitors input from your terminal. The shell
accepts typed lines from the terminal, splits them into command names and arguments, then executes the
command. The command can be the name of a shell built-in, an executable script of commands, or an
executable program. There is nothing special about system-provided commands, except that they are
kept in directories where the shell can find them. You can also keep commands in your own directories
and arrange for the shell to find them there.
The command name is the first word on an input line to the shell; the command and its arguments are
separated from one another by blanks (one or more space and/or tab characters).
When a program terminates, the shell ordinarily regains control and prompts you to indicate that it is
ready for another command. The shell has many other capabilities, which are described in detail in the
appropriate manpages: sh-posix (1) for the POSIX shell, ksh(1) for the Korn shell, or csh(1) for the C
shell.
The Current Directory
HP-UX has a file system arranged in a hierarchy of directories. When the system administrator gave you
a user name, he or she also created a directory for you (ordinarily with the same name as your user
name, and known as your login or home directory). When you log in, that directory becomes your current
HP-UX 11i Version 2: September 2004 − 5 − Hewlett-Packard Company Section 9−−31