[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 6

About This Book

This book is Volume 6 of the six-volume AIX 5L Version 5.2 Commands Reference which contains reference information on operating system commands. It describes the tasks each command performs, how commands can be modified, how they handle input and output, who can run them, and provides a master index for all six volumes.

For a quick reference list of commands arranged in functional groups, see Volume 6.

Who Should Use This Book

This book is intended for users of operating system commands.

How to Use This Book

A command is a request to perform an operation or run a program. You use commands to tell the operating system what task you want it to perform. When commands are entered, they are deciphered by a command interpreter (also known as a shell) and that task is processed.

Some commands can be entered simply by typing one word. It is also possible to combine commands so that the output from one command becomes the input for another command. This is known as pipelining.

Flags further define the actions of commands. A flag is a modifier used with the command name on the command line, usually preceded by a dash.

Commands can also be grouped together and stored in a file. These are known as shell procedures or shell scripts. Instead of executing the commands individually, you execute the file that contains the commands.

Some commands can be constructed using Web-based System Manager applications or the System Management Interface Tool (SMIT).


The following highlighting conventions are used in this book:

Bold Identifies commands, subroutines, keywords, files, structures, directories, and other items whose names are predefined by the system. Also identifies graphical objects such as buttons, labels, and icons that the user selects.
Italics Identifies parameters whose actual names or values are to be supplied by the user.
Monospace Identifies examples of specific data values, examples of text similar to what you might see displayed, examples of portions of program code similar to what you might write as a programmer, messages from the system, or information you should actually type.


Each command may include any of the following sections:

Purpose A description of the major function of each command.
Syntax A syntax statement showing command line options.
Description A discussion of the command describing in detail its function and use.
Flags A list of command line flags and associated variables with an explanation of how the flags modify the action of the command.
Parameters A list of command line parameters and their descriptions.
Subcommands A list of subcommands (for interactive commands) that explains their use.
Exit Status A description of the exit values the command returns.
Security Specifies any permissions needed to run the command.
Examples Specific examples of how you can use the command.
Files A list of files used by the command.
Related Information A list of related commands in this book and related discussions in other books.

Reading Syntax Statements

Syntax statements are a way to represent command syntax and consist of symbols such as brackets ([ ]), braces ({ }), and vertical bars (|). The following is a sample of a syntax statement for the unget command:

unget [ -rSID ] [ -s ] [ -n ] File ...

The following conventions are used in the command syntax statements:

Listing of Installable Software Packages

To list the installable software package (fileset) of an individual command use the lslpp command with the -w flag. For example, to list the fileset that owns the installp command, enter:

lslpp -w /usr/sbin/installp

Output similar to the following displays:

File                             Fileset                 Type
/usr/sbin/installp                 bos.rte.install           File

To list the fileset that owns all file names that contain installp, enter:

lslpp -w "*installp*"

Output similar to the following displays:

File                             Fileset                 Type
/usr/sbin/installp                 bos.rte.install           File
/usr/clvm/sbin/linstallpv          prpq.clvm                 File
                                   bos.sysmgt.nim.client     File

Running Commands in the Background

If you are going to run a command that takes a long time to process, you can specify that the command run in the background. Background processing is a useful way to run programs that process slowly. To run a command in the background, you use the & operator at the end of the command:


Once the process is running in the background, you can continue to work and enter other commands on your system.

At times, you might want to run a command at a specified time or on a specific date. Using the cron daemon, you can schedule commands to run automatically. Or, using the at and batch commands, you can run commands at a later time or when the system load level permits.

Entering Commands

You typically enter commands following the shell prompt on the command line. The shell prompt can vary. In the following examples, $ is the prompt.

To display a list of the contents of your current directory, you would type ls and press the Enter key:

$ ls 

When you enter a command and it is running, the operating system does not display the shell prompt. When the command completes its action, the system displays the prompt again. This indicates that you can enter another command.

The general format for entering commands is:

Command Flag(s) Parameter

The flag alters the way a command works. Many commands have several flags. For example, if you type the -l (long) flag following the ls command, the system provides additional information about the contents of the current directory. The following example shows how to use the -l flag with the ls command:

$ ls -l

A parameter consists of a string of characters that follows a command or a flag. It specifies data, such as the name of a file or directory, or values. In the following example, the directory named /usr/bin is a parameter:

$ ls -l /usr/bin

When entering commands, it is important to remember the following:

When certain commands are entered, the shell prompt changes. Because some commands are actually programs (such as the telnet command), the prompt changes when you are operating within the command. Any command that you issue within a program is known as a subcommand. When you exit the program, the prompt returns to your shell prompt.

The operating system can operate with different shells (for example, Bourne, C, or Korn) and the commands that you enter are interpreted by the shell. Therefore, you must know what shell you are using so that you can enter the commands in the correct format.

Stopping Commands

If you enter a command and then decide to stop that command from running, you can halt the command from processing any further. To stop a command from processing, press the Interrupt key sequence (usually Ctrl-C or Alt-Pause). When the process is stopped, your shell prompt returns and you can then enter another command.

ISO 9000

ISO 9000 registered quality systems were used in the development and manufacturing of this product.

32-Bit and 64-Bit Support for the UNIX98 Specification

Beginning with Version 4.3, the operating system is designed to support The Open Group's UNIX98 Specification for portability of UNIX-based operating systems. Many new interfaces, and some current ones, have been added or enhanced to meet this specification, making Version 4.3 even more open and portable for applications.

At the same time, compatibility with previous releases of the operating system is preserved. This is accomplished by the creation of a new environment variable, which can be used to set the system environment on a per-system, per-user, or per-process basis.

To determine the proper way to develop a UNIX98-portable application, you may need to refer to The Open Group's UNIX98 Specification, which can be obtained on a CD-ROM by ordering Go Solo 2: The Authorized Guide to Version 2 of the Single UNIX Specification, a book which includes The Open Group's UNIX98 Specification on a CD-ROM.

Related Information

The following books contain information about or related to commands:

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]