Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

User Commands (g - j) getconf(1)
NAME_MAX
The maximum number of bytes in a lename. If the pathname argument species a
directory, the value returned applies to the lenames within the directory.
PATH_MAX
The maximum number of bytes in a pathname. If the pathname argument species a
directory, the value returned is the maximum length of a relative pathname when the
specied directory is the working directory.
PIPE_BUF
The maximum number of bytes that can be written atomically when writing to a pipe. If
the pathname argument species a FIFO or a pipe, the value returned applies to that
object. If the pathname argument species a directory, the value returned applies to
any FIFO created in that directory. If the pathname argument does not specify a direc-
tory or a FIFO le, the getconf command exits with a nonzero value.
POSIX_CHOWN_RESTRICTED
This variable has a value of 1 when the use of the chown function is restricted to a pro-
cess with appropriate privileges and the group ID of a le can only be changed to the
effective group ID of the process or to one of its supplementary group IDs. If the vari-
able is undened, it varies in the system, depending upon the path.
POSIX_NO_TRUNC
This variable has a value of 1 when pathnames longer than the limit specied by the
NAME_MAX variable will generate an error. If the variable is undened, it varies in
the system, depending upon the path.
POSIX_VDISABLE
When this variable has a value of 1, terminal special characters, which are dened in
the termios.h header le, can be disabled. If the pathname argument does not specify
a terminal le, the getconf command will exit with a nonzero value.
EXAMPLES
1. To display the value of the ARG_MAX environment variable, enter:
getconf ARG_MAX
2. To display the value of the PATH_MAX environment variable for the /usr directory and
check the exit codes for the command, enter the following sequence of shell commands:
value=$ (getconf PATH_MAX /usr)
status=$?
if [ "X$value" = "x" ]
then
case $status in
0) echo PATH_MAX is NULL; ;
1) echo PATH_MAX in /usr not dened; assume innity; ;
*) echo Error in the getconf command; ;
esac
else
echo The value of PATH_MAX in /usr is $value
This sequence returns the following message:
The value of PATH_MAX in /usr is 1024
527188-004 Hewlett-Packard Company 415