-
- getconf - get configuration values
-
- getconf [ options ] [ name [ path [ value ] ] ... ]
-
- getconf displays the system configuration value for name. If name is a filesystem specific variable then the value is determined relative
to path or the current directory if path is omitted. If value is specified then getconf attempts to change the process local value to
value. - may be used in place of path when it is not relevant. Only writable variables may be set; readonly variables cannot be
changed.
- The current value for name is written to the standard output. If name is valid but undefined then undefined is written to the standard
output. If name is invalid or an error occurs in determining its value, then a diagnostic written to the standard error and getconf exits with a
non-zero exit status.
- More than one variable may be set or queried by providing the name path value 3-tuple for each variable, specifying - for value
when querying.
- If no operands are specified then all known variables are written in name=value form to the standard output, one per line. Only one of --call
, --name or --standard may be specified.
- This implementation uses the astgetconf(3) string interface to the native sysconf(2),
confstr(2), pathconf(2), and sysinfo(2)
system calls. If getconf on $PATH is not the default native getconf, named by $(getconf GETCONF), then astgetconf(3)
checks only ast specific extensions and the native system calls; invalid options and/or names not supported by astgetconf(3)
cause the getconf on $PATH to be executed.
-
- -a, --all
- Call the native getconf(1) with option -a.
- -b, --base
- List base variable name sans call and standard prefixes.
- -c, --call=RE
- Display variables with call prefix that matches RE. The call prefixes are:
- CS
- confstr(2)
- PC
- pathconf(2)
- SC
- sysconf(2)
- SI
- sysinfo(2)
- XX
- Constant value.
- -d, --defined
- Only display defined values when no operands are specified.
- -l, --lowercase
- List variable names in lower case.
- -n, --name=RE
- Display variables with name that match RE.
- -p, --portable
- Display the named writable variables and values in a form that can be directly executed by sh(1)
to set the values. If name is omitted then all writable variables are listed.
- -q, --quote
- "..." quote values.
- -r, --readonly
- Display the named readonly variables in name=value form. If name is omitted then all readonly
variables are listed.
- -s, --standard=RE
- Display variables with standard prefix that matches RE. Use the --table option to view all standard
prefixes, including local additions. The standard prefixes available on all systems are:
- AES
- AST
- C
- GNU
- POSIX
- SVID
- XBS5
- XOPEN
- XPG
- -t, --table
- Display the internal table that contains the name, standard, standard section, and system call symbol prefix for each variable.
- -w, --writable
- Display the named writable variables in name=value form. If name is omitted then all writable
variables are listed.
- -v, --specification=name
- Call the native getconf(1) with option -v name
.
-
- _AST_FEATURES
- Process local writable values that are different from the default are stored in the _AST_FEATURES
environment variable. The _AST_FEATURES value is a space-separated list of name path value 3-tuples, where name is the system
configuration name, path is the corresponding path, - if no path is applicable, and value is the system configuration value.
-
- pathchk(1), confstr(2), pathconf(2),
sysconf(2), astgetconf(3)
-
- version
- getconf (AT&T Research) 2007-02-07
- author
- Glenn Fowler <gsf@research.att.com>
- author
- David Korn <dgk@research.att.com>
- copyright
- Copyright © 1992-2008 AT&T Intellectual Property
- license
- http://www.opensource.org/licenses/cpl1.0.txt