ghosTzone
main(_){return _} && echo $? /* Keep It Simple Stupid | 本博客所有文章皆为原创 转载请注明 - ghosTM55 */

在Linux下查看系统位数

ghosTM55 posted @ 2008年11月22日 01:37 in Linux , 4258 阅读
  • txi@ghosTunix:~$ getconf LONG_BIT 32

问题更新:
这里查看的是操作系统位数,而非计算机本身的位数
我在邮件列表里和别人讨论了一会儿后,发现好像没有什么现成的方法能够查看机器的位数,于是经过王聪大哥的指导写了个并不全面的脚本:

#!/bin/bash
if [ `uname -m | sed -e 's/i.86/32/'` -eq 32 ]
then
        echo 32
else
        echo 64
fi
exit 0

txi@ghosTunix:~$ date
2008年 05月 09日 星期五 17:19:16 CST

Avatar_small
light novel 说:
2019年2月22日 17:16

Oh! This article has suggested to me many new ideas. I will embark on doing it. Hope you can continue to contribute your talents in this area. Thank you.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter