getconf(1) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

getconf(1)

getconf(1)                       User Commands                      getconf(1)



NAME
       getconf - get configuration values

SYNOPSIS
       /usr/bin/getconf [-v specification] system_var


       /usr/bin/getconf [-v specification] path_var pathname


       /usr/bin/getconf -a


       /usr/xpg4/bin/getconf [-v specification] system_var


       /usr/xpg4/bin/getconf [-v specification] path_var pathname


       /usr/xpg4/bin/getconf -a


       /usr/xpg6/bin/getconf [-v specification] system_var


       /usr/xpg6/bin/getconf [-v specification] path_var pathname


       /usr/xpg6/bin/getconf -a


       /usr/xpg7/bin/getconf [-v specification] system_var


       /usr/xpg7/bin/getconf [-v specification] path_var pathname


       /usr/xpg7/bin/getconf -a

DESCRIPTION
       In  the first synopsis form, the getconf utility writes to the standard
       output the value of the variable specified by system_var, in accordance
       with specification if the -v option is used.


       In  the second synopsis form, getconf writes to the standard output the
       value of the variable specified by path_var for the path  specified  by
       pathname, in accordance with specification if the -v option is used.


       In  the  third  synopsis form, config writes to the standard output the
       names of the current system configuration variables.


       The value of each configuration variable is determined as  if  it  were
       obtained  by calling the function from which it is defined to be avail‐
       able. The value reflects conditions in the current  operating  environ‐
       ment.

OPTIONS
       The following options are supported:

       -a

           Writes all names and its values of the current system configuration
           variables to the standard output.


       -v specification

           Gives the specification which governs the selection of  values  for
           configuration variables.


OPERANDS
       The following operands are supported:


       path_var

           A  name  of  a configuration variable whose value is available from
           the pathconf(2) function.


       pathname

           A path name for which the variable specified by path_var is  to  be
           determined.


       system_var

           A  name  of  a configuration variable whose value is available from
           system interface confstr(3C), sysconf(3C) or are defined in  system
           header files limits.h(3HEAD) or unistd.h(3HEAD).



       The symbol PATH also is recognized, yielding the same value as the con‐
       fstr() name value CS_PATH.

EXAMPLES
       Example 1 Writing the Value of a Variable



       This example illustrates the value of {NGROUPS_MAX}:


         example% getconf NGROUPS_MAX


       Example 2 Writing the Value of a Variable for a Specific Directory



       This example illustrates the value of NAME_MAX for  a  specific  direc‐
       tory:


         example% getconf NAME_MAX /usr


       Example 3 Dealing with Unspecified Results



       This  example  shows how to deal more carefully with results that might
       be unspecified:


         if value=$(getconf PATH_MAX /usr); then
         if [ "$value" = "undefined" ]; then
         echo PATH_MAX in /usr is infinite.
         else
         echo PATH_MAX in /usr is $value.
         fi
         else
         echo Error in getconf.
         fi




       For example:


         sysconf(_SC_POSIX_C_BIND);




       and


         system("getconf POSIX2_C_BIND");




       in a C program could give different answers. The sysconf call  supplies
       a  value that corresponds to the conditions when the program was either
       compiled or executed, depending on the implementation. The system  call
       to getconf always supplies a value corresponding to conditions when the
       program is executed.

ENVIRONMENT VARIABLES
       See environ(7) for descriptions of the following environment  variables
       that  affect  the execution of getconf: LANG, LC_ALL, LC_CTYPE, LC_MES‐
       SAGES, and NLSPATH.

EXIT STATUS
       The following exit values are returned:

       0     The specified variable is valid and information about its current
             state was written successfully.


       >0    An error occurred.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Availabilitysystem/core-os _ Interface StabilityCommit‐
       ted _ StandardSee standards(7).


SEE ALSO
       sh(1),     pathconf(2),     sysinfo(2),    confstr(3C),    sysconf(3C),
       attributes(7), environ(7), standards(7)



Oracle Solaris 11.4               27 Oct 2015                       getconf(1)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3