Sortix
Sortix Download Manual Development Source Code News Blog More
current nightly

Sortix cross-volatile manual

This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.

NAME

getconf — get POSIX configuration values

SYNOPSIS

getconf [-alL] [-v -specification] variable [path]

DESCRIPTION

getconf writes the value of the requested POSIX configuration variable from either sysconf(3), confstr(3), or <limits.h>. If a path is specified, then pathconf(2) is used instead to look up the variable.
If the variable is valid but is not defined on the system, then undefined is written instead.
The sysconf(3) variables are requested without the _SC_ prefix. The variables starting with _POSIX_ are requested with the _POSIX_ prefix.
The confstr(3) variables are requested without the _CS_ prefix.
The pathconf(2) variables are requested without the _PC_ prefix.
The <limits.h> definitions for POSIX minimums/maximums in the format _POSIX_*_MIN and _POSIX_*_MAX can be requested.
The options are as follows:
-a
Write all variables in two space-separated columns, the first with the variable names and the second with the values. The variable operand is not parsed.
-l
Write all the variable names that does not require a path.
-L
Write all the variable names that requires a path.
-v specification
Evaluate the variable in this POSIX specification compilation environment, one of:
  • POSIX_V8_ILP32_OFF32
  • POSIX_V8_ILP32_OFFBIG
  • POSIX_V8_LP64_OFF64
  • POSIX_V8_LPBIG_OFFBIG
getconf is only able to evaluate the supported compilation environment on this system. The available environments can be determined with the POSIX_V8_WIDTH_RESTRICTED_ENVS variable.

EXIT STATUS

getconf will exit 0 on success and non-zero otherwise.

SEE ALSO

uname(1), pathconf(2), confstr(3), sysconf(3)

STANDARDS

getconf is standardized in IEEE Std 1003.1-2008 (“POSIX.1”). The -alL options are extensions.
Copyright 2011-2025 Jonas 'Sortie' Termansen and contributors.
Sortix's source code is free software under the ISC license.
#sortix on irc.sortix.org
@sortix_org