Chapter 15. Commands and Utilities

15.1. Commands and Utilities

An LSB conforming implementation shall provide the commands and utilities as described in Table 15-1, with at least the behavior described as mandatory in the referenced underlying specification, with the following exceptions:

  1. If any operand (except one which follows --) starts with a hyphen, the behavior is unspecified.

    Rationale (Informative): Applications should place options before operands, or use --, as needed. This text is needed because, by default, GNU option parsing differs from POSIX, unless the environment variable POSIXLY_CORRECT is set. For example, ls . -a in GNU ls means to list the current directory, showing all files (that is, "." is an operand and -a is an option). In POSIX, "." and -a are both operands, and the command means to list the current directory, and also the file named -a. Suggesting that applications rely on the setting of the POSIXLY_CORRECT environment variable, or try to set it, seems worse than just asking the applications to invoke commands in ways which work with either the POSIX or GNU behaviors.

Table 15-1. Commands And Utilities

[ [1]dmesg [2]id [1]mount [2]sort [1]
ar [2]du [2]install [2]msgfmt [2]split [1]
at [2]echo [2]install_initd [2]mv [1]strip [1]
awk [2]ed [1]ipcrm [2]newgrp [2]stty [1]
basename [1]egrep [2]ipcs [2]nice [1]su [2]
batch [2]env [1]join [1]nl [1]sync [2]
bc [2]expand [1]kill [1]nohup [1]tail [1]
cat [1]expr [1]killall [2]od [2]tar [2]
chfn [2]false [1]ln [1]passwd [2]tee [1]
chgrp [1]fgrep [2]locale [1]paste [1]test [1]
chmod [1]file [2]localedef [1]patch [2]time [1]
chown [1]find [2]logger [1]pathchk [1]touch [1]
chsh [2]fold [1]logname [1]pax [1]tr [1]
cksum [1]fuser [2]lp [1]pidof [2]true [1]
cmp [1]gencat [1]lpr [2]pr [1]tsort [1]
col [2]getconf [1]ls [2]printf [1]tty [1]
comm [1]gettext [2]lsb_release [2]ps [1]umount [2]
cp [1]grep [2]m4 [2]pwd [1]uname [1]
cpio [2]groupadd [2]mailx [1]remove_initd [2]unexpand [1]
crontab [2]groupdel [2]make [1]renice [2]uniq [1]
csplit [1]groupmod [2]man [1]rm [1]useradd [2]
cut [2]groups [2]md5sum [2]rmdir [1]userdel [2]
date [1]gunzip [2]mkdir [1]sed [2]usermod [2]
dd [1]gzip [2]mkfifo [1]sendmail [2]wc [1]
df [2]head [1]mknod [2]sh [2]xargs [2]
diff [1]hostname [2]mktemp [2]shutdown [2]zcat [2]
dirname [1]iconv [1]more [2]sleep [1] 

Referenced Specification(s)

An LSB conforming implementation shall provide the shell built in utilities as described in Table 15-2, with at least the behavior described as mandatory in the referenced underlying specification, with the following exceptions:

  1. The built in commands and utilities shall be provided by the sh utility itself, and need not be implemented in a manner so that they can be accessed via the exec family of functions as defined in ISO POSIX (2003) and should not be invoked directly by those standard utilities that execute other utilities ( env, find, nice, nohup, time, xargs).

    Rationale (Informative): Since the built in utilities must affect the environment of the calling process, they have no effect when executed as a file.

Table 15-2. Built In Utilities

cd [1]getopts [1]read [1]umask [1]wait [1]

Referenced Specification(s)