Command Reference Guide

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/introduction.9
________________________________________________________________
___ ___
introduction(9) introduction(9)
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 out-
put 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 charac-
ters 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 termi-
nal 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 del-
imiter), 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 function,
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 exe-
cutable 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, sh-bourne(1) for the
Bourne 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 or work-
ing directory, and any file name you type is assumed to be in that directory by default. Because you are the
owner of this directory, you have full permission to read, write, alter, or destroy its contents. The permis-
sions you have for other directories and files will have been granted or denied to you by their respective
owners, or by the system administrator. To change the current working directory use cd(1).
Path Names
To refer to files not in the current directory, you must use a path name. Full (absolute) path names begin
with
/, which is the name of the root directory of the whole file system. After the slash comes the name of
each directory containing the next subdirectory (followed by a /), until finally the file name is reached (for
example, /usr/ae/filex refers to file filex in directory ae, while ae is itself a subdirectory of usr;
usr is a subdirectory of the root directory). See glossary(9) for a formal definition of path name.
If your current directory contains subdirectories, the path names of files in them begin with the name of
the corresponding subdirectory (without a prefixed /). Generally, a path name can be used anywhere a file
name is required.
Important commands that modify the contents of directories are cp, mv, and rm which respectively copy,
move (that is, rename, relocate, or both), and remove files. To determine the status of files or the contents
HP-UX Release 11i: December 2000 5 Introduction5
___
___