getconf(1)
NAME
getconf − get system configuration values
SYNOPSIS
getconf [parameter_name] [pathname]
DESCRIPTION
getconf provides a program interface to the confstr(3C), pathconf(2), and sysconf(2) libraries.
The parameter_name argument specifies the configuration value desired in confstr(), pathconf(), or sysconf(). For parameter_name, operand values listed in the table with pathconf() as the underlying function, the pathname operand must also be supplied; otherwise, the pathname operand must not be supplied.
RETURN VALUE
The error codes returned by getconf are:
0 Success. A value corresponding to the operand was returned;
1 One or more missing or extra operands;
2 Operand was not recognized.
3 Pathname could not be accessed.
EXAMPLES
Request the number of intervals per second:
getconf CLK_TCK
Request the maximum value of a file’s link count:
getconf LINK_MAX /etc/passwd
Some other supported inquiries include:
| ARG_MAX | _POSIX_CHILD_MAX | POSIX2_C_DEV |
| BC_BASE_MAX | _POSIX_JOB_CONTROL | POSIX2_EXPR_NEST_MAX |
| BC_DIM_MAX | _POSIX_NGROUPS_MAX | POSIX2_FORT_DEV |
| BC_SCALE_MAX | _POSIX_OPEN_MAX | POSIX2_FORT_RUN |
| BC_STRING_MAX | _POSIX_SAVED_IDS | POSIX2_LINE_MAX |
| CHILD_MAX | _POSIX_SSIZE_MAX | POSIX2_LOCALEDEF |
| CLK_TCK | _POSIX_STREAM_MAX | POSIX2_RE_DUP_MAX |
| COLL_WEIGHTS_MAX | _POSIX_TZNAME_MAX | POSIX2_SW_DEV |
| CS_PATH | _POSIX_VERSION | POSIX2_VERSION |
| EXPR_NEST_MAX | POSIX2_BC_BASE_MAX | RE_DUP_MAX |
| LINE_MAX | POSIX2_BC_DIM_MAX | SC_PASS_MAX |
| NGROUPS_MAX | POSIX2_BC_SCALE_MAX | SC_XOPEN_VERSION |
| OPEN_MAX | POSIX2_BC_STRING_MAX | STREAM_MAX |
| PATH | POSIX2_COLL_WEIGHTS_MAX | TZNAME_MAX |
| _POSIX_ARG_MAX | POSIX2_C_BIND |
Some other supported inquires, which require the second parameter:
| LINK_MAX | PIPE_BUF | _POSIX_NAME_MAX |
| MAX_CANON | _POSIX_CHOWN_RESTRICTED | _POSIX_NO_TRUNC |
| MAX_INPUT | _POSIX_LINK_MAX | _POSIX_PATH_MAX |
| NAME_MAX | _POSIX_MAX_CANON | _POSIX_PIPE_BUF |
| PATH_MAX | _POSIX_MAX_INPUT | _POSIX_VDISABLE |
AUTHOR
getconf was developed by HP and POSIX.
SEE ALSO
confstr(3C), pathconf(2), sysconf(2).
STANDARDS CONFORMANCE
getconf: POSIX.2
Hewlett-Packard Company — HP-UX Release 9.0: August 1992