getconf

display POSIX configuration information 

Command


SYNOPSIS

getconf system_var

getconf path_var pathname

getconf [-a]


DESCRIPTION

The getconf command displays the value of a specified configuration variable on the standard output. You can specify the configuration variable using one of the forms listed in the SYNOPSIS section. If you use the first form (system_var), getconf simply displays the value of the variable system_var. If you use the second form(path_var pathname), getconf displays the value of the variable path_var for the path name given by pathname.

getconf displays numeric values in decimal format and non-numeric values as simple strings. If the value is undefined, getconf writes the string undefined to the standard output.

If no options or arguments are specified on the command line or the -a option is specified, getconf displays all current configuration variables, and their values, on standard output. In this case, path variables are determined using a path name of dot (.).

Options

-a 

displays all configuration variables for the current system and their values, on standard output. Path variables are determined using a path name of dot (.).

Configuration Variables

You can use the second form of getconf to find the value of the following POSIX.1-1990 standard configuration variables for the specified pathname.

LINK_MAX 

maximum number of links that this file can have.

MAX_CANON 

maximum number of bytes in the terminal's canonical input queue (before line editing).

MAX_INPUT 

space available in terminal input queue.

NAME_MAX 

largest file name size.

PATH_MAX 

maximum number of bytes in a path name.

PIPE_BUF 

largest atomic write to a pipe.

_POSIX_CHOWN_RESTRICTED 

restrictions apply to file ownership changes.

_POSIX_NO_TRUNC 

if set, it is an error for any path name component to be longer than NAME_MAX bytes.

_POSIX_VDISABLE 

processes are allowed to disable terminal special characters.

You can use the first form of getconf to find the value of the following POSIX.1-1990 standard configuration variables.

ARG_MAX 

maximum length of arguments for running a program, in bytes, including environment data.

CHILD_MAX 

maximum number of simultaneous processes allowed per real user.

CLK_TCK 

number of intervals per second in machine clock.

NGROUPS_MAX 

number of simultaneous group IDs per process.

OPEN_MAX 

maximum number of open files at any time per process.

STREAM_MAX 

maximum number of streams that one process can have open at one time.

TZNAME_MAX 

maximum number of bytes supported for the name of a time zone (not of the TZ variable).

_POSIX_ARG_MAX 

minimum conforming value for ARG_MAX.

_POSIX_CHILD_MAX 

minimum conforming value for CHILD_MAX.

_POSIX_JOB_CONTROL 

POSIX job control supported.

_POSIX_LINK_MAX 

minimum conforming value for LINK_MAX.

_POSIX_MAX_CANON 

minimum conforming value for MAX_CANON.

_POSIX_MAX_INPUT 

minimum conforming value for MAX_INPUT.

_POSIX_NAME_MAX 

minimum conforming value for NAME_MAX.

_POSIX_NGROUPS_MAX 

minimum conforming value for NGROUPS_MAX.

_POSIX_OPEN_MAX 

minimum conforming value for OPEN_MAX.

_POSIX_PATH_MAX 

minimum conforming value for PATH_MAX.

_POSIX_PIPE_BUF 

minimum conforming value for PIPE_BUF.

_POSIX_SAVED_IDS 

processes have saved set-user-ID and saved set-group-ID.

_POSIX_SSIZE_MAX 

value that can be stored in an object of type ssize_t.

_POSIX_STREAM_MAX 

minimum conforming value for STREAM_MAX.

_POSIX_TZNAME_MAX 

minimum conforming value for TZNAME_MAX.

_POSIX_VERSION 

gives version of POSIX adhered to in this release.

You can use the first form of getconf to find the value of the following POSIX.2 standard configuration variables.

BC_BASE_MAX 

maximum ibase and obase values for the bc command.

BC_DIM_MAX 

maximum number of elements permitted in a bc array.

BC_SCALE_MAX 

maximum scale size allowed in bc.

BC_STRING_MAX 

maximum number of characters in a string in bc.

COLL_WEIGHTS_MAX 

maximum number of weights assignable to an entry of the LC_COLLATE order keyword.

EXPR_NEST_MAX 

maximum number of expressions that you can nest inside parentheses in an expression evaluated by expr.

LINE_MAX 

maximum number of characters that a utility can accept as an input line (either from the standard input or a text file) when the utility takes text files as input. This number includes the trailing newline.

PATH 

standard PATH setting.

_CS_PATH 

standard PATH setting.

RE_DUP_MAX 

maximum number of repeated occurrences of a regular expression when using the interval notation \{m,n\} (see regexp).

POSIX2_C_BIND 

indicates whether the system supports the C Language Bindings Option.

POSIX2_C_DEV 

indicates whether the system supports the C Language Development Utilities Option.

POSIX2_FORT_DEV 

indicates whether the system supports the FORTRAN Development Utilities Option.

POSIX2_FORT_RUN 

indicates whether the system supports the FORTRAN Runtime Utilities Option.

POSIX2_LOCALEDEF 

indicates whether the system supports the creation of locales.

POSIX2_SW_DEV 

indicates whether the system supports the Software Development Utilities Option.

POSIX2_CHAR_TERM 

indicates whether the system supports at least one terminal type capable of all operations necessary for the User Portability Utilities. Only on if POSIX2_UPE is on.

POSIX2_UPE 

indicates whether the system supports the User Portability Utilities Option.

POSIX2_VERSION 

gives the version of POSIX.2 adhered to in this release.

POSIX2_BC_BASE_MAX 

minimum conforming value for BC_BASE_MAX.

POSIX2_BC_DIM_MAX 

minimum conforming value for BC_DIM_MAX.

POSIX2_BC_SCALE_MAX 

minimum conforming value for BC_SCALE_MAX.

POSIX2_BC_STRING_MAX 

minimum conforming value for BC_STRING_MAX.

POSIX2_COLL_WEIGHTS_MAX 

minimum conforming value for EQUIV_CLASS_MAX.

POSIX2_EXPR_NEST_MAX 

minimum conforming value for EXPR_NEST_MAX.

POSIX2_LINE_MAX 

minimum conforming value for LINE_MAX.

POSIX2_RE_DUP_MAX 

minimum conforming value for RE_DUP_MAX.

This implementation of getconf also recognizes the following non-POSIX-compliant name.

_CS_BINDIR 

identifies the directory which contains the PTC MKS Toolkit executables.

_CS_ETCDIR 

identifies the directory which contains various configuration files. On Windows systems, this is ROOTDIR/etc.

_CS_LIBDIR 

identifies the directory which contains various support files for development utilities. On Windows systems, this is ROOTDIR/etc.

_CS_MANPATH 

identifies the default directory which man searches when looking for reference pages. On Windows systems, this is ROOTDIR/etc.

_CS_NLSDIR 

identifies the directory which contains the various files used in localization.

_CS_NULLDEV 

gives the name of the file used as the infinite data source/sink. Data written to this file is discarded. When you read from this file, it always returns an EOF. On Windows systems, this is /dev/null.

_CS_SHELL 

identifies the default shell (command interpreter).

_CS_SPOOLDIR 

identifies the directory which serves as the system spool directory. On Windows systems, this is /usr/spool.

_CS_TMPDIR 

identifies the default directory which is used to create temporary files. On Windows systems, this is /tmp.

_CS_TTYDEV 

gives the file name used to access the controlling terminal. On Windows systems, this is /dev/con.


EXAMPLES

The following example uses getconf to find the minimum conforming value for PATH_MAX, which is contained in the variable _POSIX_PATH_MAX. If you enter

getconf _POSIX_PATH_MAX

getconf displays

255

DIAGNOSTICS

Possible exit status values are:

0 

The specified parameter_name was valid and getconf displayed its value successfully.

>0 

An error occurred.


PORTABILITY

POSIX.2. Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.

_CS_SHELL is an extension to the POSIX standard. Systems that conform to POSIX.1-1988 may not support the symbols SSIZE_MAX, _POSIX_SSIZE_MAX, STREAM_MAX, _POSIX_STREAM_MAX, TZNAME_MAX, and _POSIX_TZNAME_MAX.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
bc, expr, sh

Miscellaneous:
regexp


PTC MKS Toolkit 10.1 patch 1 Documentation Build 2.