Linux命令——getconf

转自:灵活使用getconf命令来获取系统信息

简介

getconf本身是个ELF可执行文件,用于获取系统信息

用法

getconf -a可以获取全部系统信息

对于这个命令,记住几个常用的信息获取方法就行

getconf PAGE_SIZE 查看系统内存分页大小

getconf LONG_BIT 看linux是32位还是64位最简单的方法

_CS_PATH Value for the PATH environment variable used to find commands.
ARG_MAX Maximum length, in bytes, of the arguments for one of the exec subroutines, including environment data.
BC_BASE_MAX Maximum value allowed for the obase variable with the bc command.
BC_DIM_MAX Maximum number of elements permitted in an array by the bc command.
BC_SCALE_MAX Maximum value allowed for the scale variable with the bc command.
BC_STRING_MAX Maximum length of a string constant accepted by the bc command.
CHARCLASS_NAME_MAX Maximum number of bytes in a character class name.
CHAR_BIT Number of bits in a type character.
CHAR_MAX Maximum value of a type character.
CHAR_MIN Minimum value of a type character.
CHILD_MAX Maximum number of simultaneous processes for each real user ID.
CLK_TCK Number of clock ticks per second returned by the time subroutine.
COLL_WEIGHTS_MAX Maximum number of weights that can be assigned to an entry in the LC_COLLATE locale stanza in a locale-definition file.
CS_PATH Value of the PATH environment variable used to find commands.
EXPR_NEST_MAX Maximum number of expressions that can be nested within parentheses by the expr command.
INT_MAX Maximum value of a type int.
INT_MIN Minimum value of a type int.
LINE_MAX Maximum length, in bytes, of a command‘s input line (either standard input or another file) when the utility is described as processing text files. The length includes room for the trailing new-line character.
LONG_BIT Number of bits in a type long int.
LONG_MAX Maximum value of a type long int.
LONG_MIN Minimum value of a type long int.
MB_LEN_MAX Maximum number of bytes in a character for any supported locale.
NGROUPS_MAX Maximum number of simultaneous supplementary group IDs for each process.
NL_ARGMAX Maximum value of digit in calls to the printf and scanf subroutines.
NL_LANGMAX Maximum number of bytes in a LANG name.
NL_MSGMAX Maximum message number.
NL_NMAX Maximum number of bytes in an N-to-1 collation mapping.
NL_SETMAX Maximum set number.
NL_TEXTMAX Maximum number of bytes in a message string.
NZERO Default process priority.
OPEN_MAX Maximum number of files that one process can have open at one time.
PATH Sequence of colon-separated path prefixes used to find commands.
RE_DUP_MAX Maximum number of repeated occurrences of a regular expression permitted when using the interval-notation parameters, such as the m and n parameters with the ed command.
SCHAR_MAX Maximum value of a type signed char.
SCHAR_MIN Minimum value of a type signed char.
SHRT_MAX Maximum value of a type short.
SHRT_MIN Minimum value of a type short.
SSIZE_MAX Maximum value of an object of type ssize_t.
STREAM_MAX Number of streams that one process can have open at one time.
TMP_MAX Minimum number of unique path names generated by the tmpnam subroutine. Maximum number of times an application can reliably call the tmpnam subroutine.
TZNAME_MAX Maximum number of bytes supported for the name of a time zone (not the length of the TZ environment variable).
UCHAR_MAX Maximum value of a type unsigned char.
UINT_MAX Maximum value of a type unsigned int.
ULONG_MAX Maximum value of a type unsigned long int.
USHRT_MAX Maximum value of a type unsigned short int.
WORD_BIT Number of bits in a word or type int

原文地址:https://www.cnblogs.com/kelamoyujuzhen/p/10115985.html

时间: 2024-08-30 07:02:01

Linux命令——getconf的相关文章

【Linux】linux命令大全

109个Linux命令 目录 1       文件管理... 5 1.1          basename. 5 1.2          cat 5 1.3          cd. 5 1.4          chgrp. 5 1.5          chmod. 6 1.6          chown. 7 1.7          comm.. 7 1.8          cp. 7 1.9          cut 8 1.10        dd. 8 1.11      

最实用的 Linux 命令行使用技巧

我们可能每天都会要使用到很多的 Linux 命令行. 我们也会网络上知晓一些使用它们的小技巧,但是如果我们没有时常来进行练习,就有可能会忘掉怎么去使用它们. 所以我就决定把那些你可能会忘记的小提示和小技巧,或者对你而言可能是全新的东西都列表来. 将输出内容以表格的形式显示出来 有时,在你看到命令行执行的输出时,因为字符串过度拥挤(比如说 mount 命令的输出)导致输出内容难以识别.如果我们看到的内容是一张表格会如何呢?其实这是很容易做到的! mount | column –t: 在此例中,由于

linux命令汇总1

允许非root用户使用“sudo” root身份登录系统,执行“visudo”,根据示例添加新的一个规则(记住输入的密码是当前用户密码,而不是root密码)#不需要密码执行sudo命令hadoop        ALL=(ALL)       NOPASSWD: ALL 日期 时间戳转日期date -d '1970-01-01 UTC 1312438633.724 seconds' +"%Y-%m-%d %T" #显示现在日期echo `date -d now +%Y%m%d` #显示

常用的linux命令(经常更新)

可网上搜索“linux命令大全”学习,以下是本人用到的一些常用命令. 20150716 cd /home 进入 '/ home' 目录' cd .. 返回上一级目录 cd ../.. 返回上两级目录 cd 进入个人的主目录 cd ~user1 进入个人的主目录 cd - 返回上次所在的目录 cat命令详解:在使用 "cat > filename.txt" 创建文件时,可采用下面步骤: 1.键入cat > filename.txt 后回车 2.录入文本内容: 3.键入回车:

Linux命令——pr

参考:Linux命令——column 前言 接触这个命令的初衷是我想把一个很长的单列输出设置成多列输出,奈何column的分列输出机制太智障,直到我发现了pr 参数 pr -#, 输出指定的列数. -t, 忽略页眉和页脚 -T, 忽略页眉和页脚,去除所有分页记号 查看/usr/bin下面可执行文件,发现有600多行. [[email protected] bin]# find /usr/bin/ -executable -type f | wc -l 641 单列显示的话看起来很吃力,可以借助p

开发中必知必会的常用Linux命令

开发中必知必会的常用Linux命令导语在日常的开发中,Linux操作系统是经常要接触到的,所以关于Linux的常用命令,我们一定要熟悉,在这里,我把平时经常用到的命令总结了一下. 1,基本命令(熟记于心)# 切换目录cd 目录# 退出到上一级cd ..# 输出当前绝对路径pwd# 列出当前目录下所有的文件或目录ls # 创建文件目录mkdir# [强制]杀死进程kill [-9]# -r递归复制 cp [-r] a b# 移动或者重命名mv a b# 删除文件 小心使用rm -rf /rm [-

linux命令格式,获取帮助及其目录结构简要理解

我们都知道,一台计算机要是没通电,和一堆废铁没什么区别.那么,通电开机进入系统后,会进入交互界面,等待用户操作,人与计算机交互界面有两种: GUI:图形用户接口.如我们平时使用的Windows  ,linux的X window,有KDE和GOME. CLI:命令行接口,使用的SHELL类型有bash ,csh,tcshell,zshell等. 例如:[[email protected] ~]# commandbin root:当前登录的用户名. dxlcentOS:当前主机的主机名.@是一个分隔

linux 命令 及学习进度综合整理

linux  命令  及学习进度综合整理 pwd 查看当前所在位置 cd  跳转到什么什么目录 ls  显示所有文件和目录 ls -l  显示目录详细信息 cd ..  返回上一级 vi  lnany.txt  创建一个文件 vi  .lnany.txt    创建一个隐藏文件 vim 是 vi 的升级版 功能更多 出现 -bash: vim: command not found 的解决办法 i. 那么如何安裝 vim 呢?输入rpm -qa|grep vim 命令, 如果 vim 已经正确安裝

9个使用时必须时刻警惕的Linux命令

Linux shell/terminal命令非常强大,即使一个简单的命令就可能导致文件夹.文件或者路径文件夹等被删除.为了避免这样的事情发生,我们应该时刻注意PHP代码&命令,今天为大家带来9个必须时刻警惕的Linux命令&代码. Linux shell/terminal 命令非常强大,即使一个简单的命令就可能导致文件夹.文件或者路径文件夹等被删除. 在一些情况下,Linux 甚至不会询问你而直接执行命令,导致你丢失各种数据信息. 一般来说在 Web 上推荐新的 Linux 用户执行这些命