INTRO(1) | User Commands | INTRO(1) |
Intro, intro - introduction to commands and application programs
This section describes, in alphabetical order, commands available with this operating system.
Pages of special interest are categorized as follows:
1B
1C
1S
See the following sections of the SunOS Reference Manual for more information.
For tutorial information about these commands and procedures, see Solaris Advanced User's Guide.
Unless otherwise noted, commands described in the SYNOPSIS section of a manual page accept options and other arguments according to the following syntax and should be interpreted as explained below.
name [-option...] [cmdarg...] where:
[ ]
...
name
{ }
option
noargletter
argletter
optarg
cmdarg
Unless otherwise specified, whenever an operand or option-argument is, or contains, a numeric value:
These command syntax guidelines are not followed by all current commands, but new commands are likely to obey them. getopts(1) should be used by all shell procedures to parse positional parameters and to check for legal options. It supports Guidelines 3-10 below. The enforcement of the other guidelines must be done by the command itself.
An expanded set of guidelines referred to as CLIP for Command Line Interface Paradigm has been developed for Solaris and other Sun products. Its intent is to provide a command line syntax more closely aligned with the GNU command line syntax popular on Linux systems.There is no intent to retrofit existing utilities or even to apply this to all new utilities. It is only intended to be applied to sets of utilities being developed when appropriate.
CLIP is a full superset of the guidelines discussed above which are closely aligned with IEEE Std. 1003.1-2001 (SUSv3). It does not include all the GNU syntax. The GNU syntax allows constructs that either conflict with the IEEE rules or are ambiguous. These constructs are not allowed.
The expanded CLIP command line syntax is:
utility_name -a --longopt1 -c option_argument \
-f option_argument --longopt2=option_argument \
--longopt3 option_argument operand
The utility in the example is named utility_name. It is followed by options, option-arguments, and operands, collectively referred to as arguments. The arguments that consist of a hyphen followed a single letter or digit, such as -a, are known as short-options . The arguments that consist of two hyphens followed by a series of letters, digits and hyphens, such as --longopt1, are known as long-options . Collectively, short-options and long-options are referred to as options (or historically, flags ). Certain options are followed by an option-argument, as shown with -c option_argument . The arguments following the last options and option-arguments are named operands. Once the first operand is encountered, all subsequent arguments are interpreted to be operands.
Option-arguments are sometimes shown separated from their short-options by BLANKSs, sometimes directly adjacent. This reflects the situation that in some cases an option-argument is included within the same argument string as the option; in most cases it is the next argument. This specification requires that the option be a separate argument from its option-argument, but there are some exceptions to ensure continued operation of historical applications:
CLIP expands the guidelines discussed with the following additional guidelines:
14.
15.
16.
17.
18.
19.
20.
21.
Several of these guidelines are only of interest to the authors of utilities. They are provided here for the use of anyone wanting to author utilities following this syntax.
See attributes(7) for a discussion of the attributes listed in this section.
Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation.
In the following statement, the phrase ``this text'' refers to portions of the system documentation.
Portions of this text are reprinted and reproduced in electronic form in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
This notice shall appear on any product containing this material.
Upon termination, each command returns two bytes of status, one supplied by the system and giving the cause for termination, and (in the case of "normal" termination) one supplied by the program [see exit(2)]. The former byte is 0 for normal termination. The latter byte is customarily 0 for successful execution and non-zero to indicate troubles such as erroneous parameters, or bad or inaccessible data. It is called variously "exit code", "exit status", or "return code", and is described only where special conventions are involved.
Some commands produce unexpected results when processing files containing null characters. These commands often treat text input lines as strings and therefore become confused upon encountering a null character (the string terminator) within a line.
May 13, 2017 | OmniOS |