判断Linux/Unix为32位或64位
方法一:
$uname -m
x86_64 (64位)
i686 (32位)
方法二:
$getconf LONG_BIT
32 (32位)
64 (64位)
查看二进制文件是否为64bit:
[AAA@Centos_AAA ~]$ file /local/perforce/p4
/local/perforce/p4: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.1, stripped
完!