SYNOPSIS
getconf [-v specification] system_var
getconf [-v specification] path_var pathname
getconf -a
DESCRIPTION
The getconf command prints values of system configuration variables.
It is a command interface to the values returned by sysconf(3), conf-
str(3), and pathconf(3). The system_var or path_var arguments, respec-
tively, specify the parameter name to be queried. `_SC_', `_CS_', and
`_PC_' prefixes must sometimes be omitted from the parameter names, as
well as leading underscores. The pathname argument is passed to path-
conf(3).
The -v option indicates that values according to a specific specifica-
tion be queried. It has currently no effect.
With the -a option, all available configuration variables and their
values are printed.
The local variable `HEIRLOOM_TOOLCHEST_VERSION' is also available. It
prints the installed version of the Heirloom Toolchest in the format
`YYYYMMDD'.
The values printed by getconf differ between the POSIX.2-1992 version
in /usr/5bin/posix/getconf and the POSIX.1-2001 version in
/usr/5bin/posix2001/getconf.
EXAMPLES
The `PATH' variable specifies a value for the corresponding shell
parameter that makes all utilities act as specified in the POSIX stan-
dard. Thus after executing
PATH=`getconf PATH` export PATH
a script can rely on POSIX behavior. Note that this does not affect
the shell which executes the script.
The `POSIX2_VERSION' variable gives the version of the POSIX standard
to which the utilities and getconf itself correspond. Thus if
POSIX.1-2001 behavior is required by a script,
posix2_version=`getconf POSIX2_VERSION`
if test ${posix2_version:-0} -lt 200112
then
echo "error: POSIX.1-2001 or later required" >&2
exit
fi
aborts the script if the requirement is not satisfied.
SEE ALSO
Man(1) output converted with
man2html