getconf - Get configuration values

Synopsis

getconf [ name [ pathname ] ]

Description

The getconf utility displays the POSIX configuration variables. If you specify name, getconf displays the value of the configuration variable on standard output. When the configuration variable depends on a path name you must specify pathname.

When no arguments are specified, getconf displays a list of all the configuration variables and their values. For those configuration variables that depend on a path name, getconf uses /.

Options

None.

Operands

If specified, name is one of these values:

CCSID
Represents the default coded character set identifier (CCSID) used internally for integrated file system path names.
CHOWN_RESTRICTED
Restrict the use of chown on the object represented by pathname to a job with appropriate privileges.
CLK_TCK
The number of clock ticks in a second.
LINK_MAX
Maximum number of links the object represented by pathname can have.
NAME_MAX
Maximum number of bytes in a file name (the last component of the path name).
NGROUPS_MAX
Maximum number of supplementary group IDs that can be associated with a job.
NO_TRUNC
Generate an error if a file name is longer than NAME_MAX.
OPEN_MAX
Maximum number of files a single job can have open at one time.
PAGE_SIZE
Represents the system hardware page size.
PAGESIZE
Represents the system hardware page size.
PATH_MAX
Maximum number of bytes in a complete path name.
PIPE_BUF
Maximum number of bytes that can be written atomically to a pipe.
STREAM_MAX
Maximum number of streams that a job can have open at one time.
THREAD_SAFE
The object represented by pathname resides in a thread-safe file system.

Exit status

  • 0 when successful.
  • >0 when successful.

Examples

  1. Determine if the directory /home is in a thread-safe file system:
    
    getconf THREAD_SAFE /home
    
  2. Display the maximum number of bytes in a file name:
    
    getconf NAME_MAX
    
  3. Display all of the configuration variables:
    
    getconf