持之以恒是什么意思| 平诊是什么意思| 宫颈鳞状上皮增生是什么意思| bally属于什么档次| 什么是盗汗症状| 国民党为什么会失败| 宫颈癌早期什么症状| 额头和下巴长痘痘是什么原因| 郁结是什么意思| 生二胎应该注意什么| 牛和什么属相最配| 法国公鸡是什么牌子| 黑胡桃色是什么颜色| 什么是寓言故事| 属鼠的和什么属相不合| 什么食物含硒多| 早上起床喉咙有痰是什么原因| 树叶为什么是绿色的| 便秘了吃什么容易排便| 沈阳有什么特产| 亮晶晶的什么| 医生和医师有什么区别| 牙周炎用什么药最见效| 破伤风针什么时候打| lge是什么意思| 头皮软绵绵的什么原因| 什么的太空| 胸椎退变是什么意思| 每个月14号都是什么情人节| 512是什么节日| 喉咙发炎吃什么水果好| 水瓶座女生和什么星座男生最配| 肌酐是检查什么的| dm是什么意思| 重磅是什么意思| 老爹鞋配什么裤子| 舌头发麻是什么情况| 高血糖吃什么菜好| 女性胆固醇高吃什么好| 神经紊乱有什么症状| d是什么元素| 撸管是什么意思| 竹子开花意味着什么| 吃什么补维生素a| 热伤风流鼻涕吃什么药| 苡米和薏米有什么区别| omega是什么意思| 就坡下驴什么意思| 螺旋体感染是什么意思| 你什么我什么| 咳嗽喝什么饮料| 权衡利弊的意思是什么| 什么有所什么| 漏尿是什么原因引起的| 一碗香是什么菜| 宝宝眼屎多是什么原因| elle是什么档次的牌子| 明哲保身是什么生肖| soho是什么意思| 兆字五行属什么| 怀孕吃什么对胎儿好| 电导率是什么意思| 想睡睡不着是什么原因| 什么是气血| 肌酐高有什么危害| 口臭应该挂什么科| 宫颈管积液什么意思| 骨赘形成是什么意思| 狮子座是什么象星座| 弦子为什么嫁给李茂| 明年是什么年| 押韵什么意思| 岍是什么意思| 口了又一是什么字| 做肠镜前喝的是什么药| 6月28日是什么星座| 例假是什么意思| 什么是太监| 酸菜鱼是什么地方的菜| 减肥中午吃什么| 12月23日什么星座| 12月份什么星座| 河南有什么特色美食| 啤酒花是什么东西| 秋葵什么季节吃| 心脏无力吃什么药最好| 哺乳期吃什么下奶| 芒硝有什么作用| 香草是什么植物| 杨枝甘露是什么东西| 什么一色| 宝宝爱出汗是什么原因| 梦见被雷劈什么意思| 什么钓鱼愿者上钩| 伊朗用什么语言| 洗衣机单漂洗是什么意思| 黄体期出血是什么原因| 女生纹身什么图案好看| 三七泡酒有什么功效| 知性女性是什么意思| 盆腔炎吃什么药| 什么是消融手术| spo2过低是什么意思| 均字五行属什么| 荟字五行属什么| 调侃什么意思| 不典型鳞状细胞是什么意思| 虾腹部的黑线是什么| disease是什么意思| 牛皮癣用什么药膏| 平反是什么意思| 会来事是什么意思| 73年属牛的是什么命| pr什么意思| 肾水不足是什么意思| 霍山石斛有什么作用| 排湿气最快的方法吃什么| 刮痧是什么| 生命科学专业学什么| 蓟类植物是什么| 菠萝蜜什么季节最好吃| 脚侧面骨头突出叫什么| 天孤星是什么意思| 脸上反复长痘是什么原因| 1998年出生属什么| 9月12是什么星座| 胃炎吃什么药| 肛门瘙痒用什么药好| 白夜是什么意思| 甲状腺过氧化物酶抗体高说明什么问题| 拉肚子吃什么菜| 过敏是什么意思| 阳痿吃什么中成药| 24D是什么激素| 坏垣是什么意思| 头晕是什么病的前兆| 肠镜活检意味着什么| 维生素d是什么| 为什么小鸟站在电线上不会触电| 梦见自己得了重病预示什么| 什么情况属于诈骗| 肠系膜淋巴结肿大吃什么药| 牛百叶是什么| 脸部肿胀是什么原因| 经期同房需要注意什么| 眼皮红肿是什么原因引起的| 外痔是什么样子的| 小暑是什么意思| 阴柔是什么意思| 孕妇吃什么菜| 56年属什么生肖| 栀子花什么时候修剪| 手腕血管疼是什么原因| 红男绿女是什么生肖| s是什么化学元素| 开普拉多的都是什么人| jet是什么意思| 有痔疮不能吃什么食物| 这是什么| 洗涤剂是什么| 荷兰豆炒什么好吃| 回执单是什么意思| 荠菜是什么菜| 抽筋是什么病| 什么样的人容易高原反应| 普瑞巴林胶囊治什么病| 堂客是什么意思| 回心转意是什么意思| 臭虫怕什么东西| 11月2日是什么星座| 脸红是什么原因引起的| 甲是什么生肖| toshiba是什么牌子| 什么牌子的笔记本电脑好| 六月生日是什么星座| 胃胀打嗝是什么原因| 什么饮料解渴| 学习机什么牌子好| 1022是什么星座| 为什么眼睛会红| 护理专业是干什么的| 全自动洗衣机不排水是什么原因| 什么节日吃汤圆| 地图鱼吃什么| 身体欠佳什么意思| 嘴唇发白什么原因| 气管憩室是什么意思| 夏天适合喝什么养生茶| 没有力气是什么原因| 活珠子是什么| 什么是穿刺检查| 打狂犬疫苗后注意什么| 人为什么会发烧| 有什么功效| 快速补血吃什么| 黄体功能不足是什么原因造成的| 莞尔一笑什么意思| sin是什么边比什么边| 吃了狗肉不能吃什么| 云指什么生肖| 釜底抽薪什么意思| 天麻炖什么治疗头痛效果最好| 肾衰透析病人吃什么好| 什么东西越擦越小| 紫菜不能和什么一起吃| 臭屁多是什么原因| 不成敬意是什么意思| 真丝棉是什么面料| 西红柿可以做什么菜| 甲功五项能查出什么病| 刺瘊子是什么原因造成的| 心咒是什么意思| 杜甫是什么朝代的| 河南的特产是什么| 静脉曲张手术后吃什么| 严重失眠吃什么药最好| 血小板异常是什么原因| 鱼龙是什么| 宫颈细胞学检查是什么意思| 生姜泡醋有什么功效| 风寒感冒吃什么药好| 嘴发酸是什么原因引起| 都有什么菜好吃| 芊芊是什么意思| 螃蟹代表什么生肖| 儿童头疼挂什么科| 霸王别姬是什么意思| 情何以堪 什么意思| 平衡是什么意思| 诸葛亮属相是什么生肖| 顽固性失眠吃什么药| 暇步士属于什么档次| 粉刺是什么样的图片| 香雪酒属于什么酒| 月经前长痘痘是什么原因| 身心疲惫是什么意思| 弯了是什么意思| 五更泻吃什么药| 白带什么时候来| 什么是优质碳水| 七杀大运是什么意思| ebay是什么| 什么问题| 太阳花是什么花| 画龙点睛是什么意思| 什么的蜻蜓| 疤痕痒是什么原因| 贡菜是什么菜| 屁多肚子胀是什么原因| 嘴唇是紫色的是什么原因| 手术后吃什么补品好| 雅五行属性是什么| 王莲是什么植物| 六畜兴旺是什么意思| 血脂高吃什么食物| 结婚36年是什么婚| 心功能二级是什么意思| 下午一点到三点是什么时辰| 1977年什么命| 老日念什么| 小郡肝是什么| 氨基酸有什么作用| 公积金缴存基数是什么意思| c7是什么意思| 百度
The Open Group Base Specifications Issue 8
IEEE Std 1003.1-2024
Copyright ? 2001-2024 The IEEE and The Open Group

NAME

getconf — get configuration values

SYNOPSIS

getconf [-v specification] system_var

getconf
[-v specification] path_var pathname

DESCRIPTION

In the first synopsis form, the getconf utility shall write to the standard output the value of the variable specified by the system_var operand.

In the second synopsis form, the getconf utility shall write to the standard output the value of the variable specified by the path_var operand for the path specified by the pathname operand.

The value of each configuration variable shall be determined as if it were obtained by calling the function from which it is defined to be available by this volume of POSIX.1-2024 or by the System Interfaces volume of POSIX.1-2024 (see the OPERANDS section). The value shall reflect conditions in the current operating environment.

OPTIONS

The getconf utility shall conform to XBD 12.2 Utility Syntax Guidelines.

The following option shall be supported:

-v specification

Indicate a specific specification and version for which configuration variables shall be determined. If this option is not specified, the values returned correspond to an implementation default conforming compilation environment.

If the command:

getconf _POSIX_V8_ILP32_OFF32

does not write "-1\n" or "undefined\n" to standard output, then commands of the form:

getconf -v POSIX_V8_ILP32_OFF32 ...

determine values for configuration variables corresponding to the POSIX_V8_ILP32_OFF32 compilation environment specified in c17, the EXTENDED DESCRIPTION.

If the command:

getconf _POSIX_V8_ILP32_OFFBIG

does not write "-1\n" or "undefined\n" to standard output, then commands of the form:

getconf -v POSIX_V8_ILP32_OFFBIG ...

determine values for configuration variables corresponding to the POSIX_V8_ILP32_OFFBIG compilation environment specified in c17, the EXTENDED DESCRIPTION.

If the command:

getconf _POSIX_V8_LP64_OFF64

does not write "-1\n" or "undefined\n" to standard output, then commands of the form:

getconf -v POSIX_V8_LP64_OFF64 ...

determine values for configuration variables corresponding to the POSIX_V8_LP64_OFF64 compilation environment specified in c17, the EXTENDED DESCRIPTION.

If the command:

getconf _POSIX_V8_LPBIG_OFFBIG

does not write "-1\n" or "undefined\n" to standard output, then commands of the form:

getconf -v POSIX_V8_LPBIG_OFFBIG ...

determine values for configuration variables corresponding to the POSIX_V8_LPBIG_OFFBIG compilation environment specified in c17, the EXTENDED DESCRIPTION.

OPERANDS

The following operands shall be supported:

path_var
A name of a configuration variable. All of the variables in the Variable column of the table in the DESCRIPTION of the fpathconf() function defined in the System Interfaces volume of POSIX.1-2024, without the enclosing braces, shall be supported. The implementation may add other local variables.
pathname
A pathname for which the variable specified by path_var is to be determined.
system_var
A name of a configuration variable. All of the following variables shall be supported:
  • The names, without the enclosing braces, in the Variable column of the table in the DESCRIPTION of the sysconf() function in the System Interfaces volume of POSIX.1-2024, except for the entries corresponding to _SC_CLK_TCK, _SC_GETGR_R_SIZE_MAX, _SC_GETPW_R_SIZE_MAX, _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLN, and _SC_NSIG.

    For compatibility with earlier versions, the following variable names shall also be supported: POSIX2_C_BIND POSIX2_C_DEV POSIX2_CHAR_TERM POSIX2_FORT_RUN POSIX2_LOCALEDEF POSIX2_SW_DEV POSIX2_UPE POSIX2_VERSION

    and shall be equivalent to the same name prefixed with an <underscore>. This requirement may be removed in a future version.

  • The names NPROCESSORS_CONF and NPROCESSORS_ONLN. The values of these configuration variables shall be determined as if they were obtained by calling the function sysconf() with the argument _SC_NPROCESSORS_CONF or _SC_NPROCESSORS_ONLN, respectively.

  • The names of the symbolic constants used as the name argument of the confstr() function in the System Interfaces volume of POSIX.1-2024, without the _CS_ prefix.

  • The names of the symbolic constants listed under the headings "Maximum Values" and "Minimum Values" in the description of the <limits.h> header in the Base Definitions volume of POSIX.1-2024, without the enclosing braces.

    For compatibility with earlier versions, the following variable names shall also be supported: POSIX2_BC_BASE_MAX POSIX2_BC_DIM_MAX POSIX2_BC_SCALE_MAX POSIX2_BC_STRING_MAX POSIX2_COLL_WEIGHTS_MAX POSIX2_EXPR_NEST_MAX POSIX2_LINE_MAX POSIX2_RE_DUP_MAX

    and shall be equivalent to the same name prefixed with an <underscore>. This requirement may be removed in a future version.

The implementation may add other local values.

STDIN

Not used.

INPUT FILES

None.

ENVIRONMENT VARIABLES

The following environment variables shall affect the execution of getconf:

LANG
Provide a default value for the internationalization variables that are unset or null. (See XBD 8.2 Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.)
LC_ALL
If set to a non-empty string value, override the values of all the other internationalization variables.
LC_CTYPE
Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments).
LC_MESSAGES

Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.
NLSPATH
[XSI] [Option Start] Determine the location of messages objects and message catalogs. [Option End]

ASYNCHRONOUS EVENTS

Default.

STDOUT

If the specified variable is defined on the system and its value is described to be available from the confstr() function defined in the System Interfaces volume of POSIX.1-2024, its value shall be written in the following format:

"%s\n", <value>

Otherwise, if the specified variable is defined on the system, its value shall be written in the following format:

"%d\n", <value>

If the specified variable is valid, but is undefined on the system, getconf shall write using the following format:

"undefined\n"

If the variable name is invalid or an error occurs, nothing shall be written to standard output.

STDERR

The standard error shall be used only for diagnostic messages.

OUTPUT FILES

None.

EXTENDED DESCRIPTION

None.

EXIT STATUS

The following exit values shall be returned:

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

CONSEQUENCES OF ERRORS

Default.


The following sections are informative.

APPLICATION USAGE

None.

EXAMPLES

The following example illustrates the value of {NGROUPS_MAX}:

getconf NGROUPS_MAX

The following example illustrates the value of {NAME_MAX} for a specific directory:

getconf NAME_MAX /usr

The following 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 indeterminate.
    else
        echo PATH_MAX in /usr is $value.
    fi
else
    echo Error in getconf.
fi

RATIONALE

The original need for this utility, and for the confstr() function, was to provide a way of finding the configuration-defined default value for the PATH environment variable. Since PATH can be modified by the user to include directories that could contain utilities replacing the standard utilities, shell scripts need a way to determine the system-supplied PATH environment variable value that contains the correct search path for the standard utilities. It was later suggested that access to the other variables described in this volume of POSIX.1-2024 could also be useful to applications.

This functionality of getconf would not be adequately subsumed by another command such as:

grep var /etc/conf

because such a strategy would provide correct values for neither those variables that can vary at runtime, nor those that can vary depending on the path.

Early proposal versions of getconf specified exit status 1 when the specified variable was valid, but not defined on the system. The output string "undefined" is now used to specify this case with exit code 0 because so many things depend on an exit code of zero when an invoked utility is successful.

FUTURE DIRECTIONS

None.

SEE ALSO

c17

XBD 8. Environment Variables, 12.2 Utility Syntax Guidelines, <limits.h>

XSH confstr(), fpathconf(), sysconf(), system()

CHANGE HISTORY

First released in Issue 4.

Issue 5

In the OPERANDS section:

Issue 6

The Open Group Corrigendum U029/4 is applied, correcting the example command in the last paragraph of the OPTIONS section.

The following new requirements on POSIX implementations derive from alignment with the Single UNIX Specification:

This reference page is updated for alignment with the ISO/IEC 9899:1999 standard. Specifically, new macros for c99 programming environments are introduced.

XSI marked system_var (XBS5_*) values are marked LEGACY.

IEEE Std 1003.1-2001/Cor 1-2002, item XCU/TC1/D6/27 is applied, correcting the descriptions of path_var and system_var in the OPERANDS section.

Issue 7

SD5-XCU-ERN-97 is applied, updating the SYNOPSIS.

The EXAMPLES section is corrected.

POSIX.1-2008, Technical Corrigendum 1, XCU/TC1-2008/0091 [125] is applied.

Issue 8

Austin Group Defect 339 is applied, adding the system_var names NPROCESSORS_CONF and NPROCESSORS_ONLN.

Austin Group Defect 1122 is applied, changing the description of NLSPATH .

Austin Group Defect 1330 is applied, removing obsolescent interfaces and changing "_V7_" to "_V8_".

End of informative text.

 

return to top of page

UNIX? is a registered Trademark of The Open Group.
POSIX? is a Trademark of The IEEE.
Copyright ? 2001-2024 The IEEE and The Open Group, All Rights Reserved
[ Main Index | XBD | XSH | XCU | XRAT ]

抑郁看病看什么科 crt是什么 给女生送礼物送什么好 88年属龙的是什么命 铅超标吃什么排铅
m2是什么单位 窦性心律室性早搏是什么意思 打嗝多是什么原因 什么床垫好 正规医院减肥挂什么科
积劳成疾的疾什么意思 pet什么意思 垂的第三笔是什么 鱼平念什么 示字旁与什么有关
梦见很多虫子是什么意思 什么叫动脉硬化 早搏的症状是什么表现 女性白带多吃什么药 疔是什么意思
homie是什么意思hcv7jop9ns1r.cn 泡芙是什么hcv8jop1ns7r.cn 勃起不坚硬吃什么药hcv8jop9ns6r.cn 疖子是什么mmeoe.com 白细胞低是怎么回事有什么危害hcv9jop3ns2r.cn
咖啡有什么作用hcv8jop8ns3r.cn 美尼尔综合症吃什么药hcv7jop4ns7r.cn 最贵的榴莲是什么品种hcv9jop3ns9r.cn 刮痧出痧说明什么hcv8jop3ns1r.cn 7月20号什么星座hcv9jop0ns2r.cn
闪光眼是什么症状xinmaowt.com 女生的阴道长什么样hcv7jop9ns3r.cn 泡妞是什么意思hcv8jop9ns2r.cn 半边屁股疼是什么原因hcv9jop8ns0r.cn 眼睛雾化的作用是什么adwl56.com
渗透压低是什么原因hcv8jop0ns0r.cn 黄钻有什么用hcv9jop0ns6r.cn 血燥吃什么好hcv7jop4ns5r.cn 555是什么烟cl108k.com 打两个喷嚏代表什么hcv8jop1ns9r.cn
百度