This book provides end users with complete detailed information about commands for the AIX® operating system. The commands are listed alphabetically and by category, and complete descriptions are given for commands and their available flags. If applicable, each command listing contains examples. This volume contains AIX® commands that begin with the letters n through r. This publication is also available on the documentation CD that is shipped with the operating system.
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:
Each command may include any of the following sections:
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:
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 /usr/lpp/bos.sysmgt/nim/methods/c_installp bos.sysmgt.nim.client File
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:
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.
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:
$ cat /usr/ust/mydir/mydata > \ /usr/usts/yourdir/yourdata
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.
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 registered quality systems were used in the development and manufacturing of this product.
Beginning with Version 5.2, the operating system is designed to support The Open Group's Single UNIX Specification Version 3 (UNIX 03) 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 5.2 even more open and portable for applications, while remaining compatible with previous releases of AIX®.
To determine the proper way to develop a UNIX® 03-portable application, you may need to refer to The Open Group's UNIX® 03 specification, which can be accessed online or downloaded from http://www.unix.org/ .
The following books contain information about or related to commands: