修改getconf LONG_BIT显示的值

不知道什么原因导致Linux系统执行getconf LONG_BIT显示的值为32,而操作系统实际是64位。

通过修改软链接 

[root@server4]#ls -l /usr/libexec/getconf/

lrwxrwxrwx 1 root root    20  6月  5 10:02 default -> POSIX_V6_ILP32_OFF32

[root@server4 getconf]# ln -s  POSIX_V6_LP64_OFF64 default

以下为操作过程

[root@server4 ~]# cd /usr/libexec/getconf/
[root@server4 getconf]# ls
default  POSIX_V6_ILP32_OFF32  POSIX_V6_ILP32_OFFBIG  POSIX_V6_LP64_OFF64  POSIX_V7_ILP32_OFF32  POSIX_V7_ILP32_OFFBIG  POSIX_V7_LP64_OFF64
[root@server4 getconf]# ls -l
总用量 152
lrwxrwxrwx 1 root root    20  6月  5 10:02 default -> POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# ls -s default POSIX_V6_LP64_OFF64
 0 default  28 POSIX_V6_LP64_OFF64
[root@server4 getconf]# ls -l
总用量 152
lrwxrwxrwx 1 root root    20  6月  5 10:02 default -> POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# ln default POSIX_V6_LP64_OFF64
ln: 创建硬链接"POSIX_V6_LP64_OFF64": 文件已存在
[root@server4 getconf]# ln  POSIX_V6_LP64_OFF64 default
[root@server4 getconf]# ls -l
总用量 180
-rwxr-xr-x 3 root root 25536 11月  3 2011 default
lrwxrwxrwx 1 root root    20  6月  5 10:02 default.bak -> POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# ls -l
总用量 180
-rwxr-xr-x 3 root root 25536 11月  3 2011 default
lrwxrwxrwx 1 root root    20  6月  5 10:02 default.bak -> POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# rm default.bak 
rm:是否删除符号链接 "default.bak"?y
[root@server4 getconf]# ls -l
总用量 180
-rwxr-xr-x 3 root root 25536 11月  3 2011 default
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# ln  POSIX_V6_LP64_OFF64 default
ln: 创建硬链接"default": 文件已存在
[root@server4 getconf]# ls -l
总用量 180
-rwxr-xr-x 3 root root 25536 11月  3 2011 default
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# rm -f default 
[root@server4 getconf]# ls -l
总用量 152
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# ln -s  POSIX_V6_LP64_OFF64 default
[root@server4 getconf]# ls -l
总用量 152
lrwxrwxrwx 1 root root    19  6月  5 15:25 default -> POSIX_V6_LP64_OFF64

-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# getconf LONG_BIT
64
[root@server4 getconf]# 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值