昨天遇到一个小问题,查看操作系统的位数,本以为所有的unixlike平台都是一样的,使用
file /sbin/init
就能看出来了.或者是ls -lF / |grep /$ 看是否有lib64/
.后来发现我错了,只是linux平台上的东西.
在solaris平台下,有一个指令可以查看的.
isainfo -v
bash-2.05# man isainfo
Reformatting page. Please Wait... done
User Commands isainfo(1)
NAME
isainfo - describe instruction set architectures
SYNOPSIS
isainfo [-v] [-b | -n | -k]
DESCRIPTION
The isainfo utility is used to identify various attributes
of the instruction set architectures supported on the
currently running system. Among the questions it can answer
are whether 64-bit applications are supported, or whether
the running kernel uses 32-bit or 64-bit device drivers.
When invoked with no flags, isainfo prints the name(s) of
the native instruction sets for applications supported by
the current version of the operating system. These will be a
subset of the list returned by isalist(1). The subset
corresponds to the basic applications environments supported
by the currently running system.
OPTIONS
The following options are supported:
-b Prints the number of bits in the address space of the
native instruction set.
-k Prints the name of the instruction set(s) used by the
operating system kernel components such as device
drivers and STREAMS modules.
-n Prints the name of the native instruction set used by
portable applications supported by the current version
of the operating system.
-v Prints more detailed information about the other
options.
EXAMPLES
Example 1: Invoking isainfo on a 32-bit x86 platform
example% isainfo -v
32-bit i386 applications
example% isainfo -k
i386
Example 2: Invoking isainfo on a system running the 32-bit
operating system on a 64-bit SPARC processor
example% isainfo -n
sparc
example% isainfo -v
SunOS 5.9 Last change: 12 Mar 1999 1
User Commands isainfo(1)
32-bit sparc applications
example% isainfo -kv
32-bit sparc kernel modules
Example 3: Invoking isainfo on the same hardware platform
(that is, a 64-bit SPARC processor) running the 64-bit
operating system
example% isainfo
sparcv9 sparc
example% isainfo -n
sparcv9
example% isainfo -v
64-bit sparcv9 applications 32-bit sparc applications
example% isainfo -vk
64-bit sparcv9 kernel modules
EXIT STATUS
Non-zero
Flags are not specified correctly, or the command is
unable to recognize attributes of the system on which
it is running. An error message is printed to stderr.
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | SUNWcsu |
|_____________________________|_____________________________|
SEE ALSO
isalist(1), uname(1), psrinfo(1M), sysinfo(2), attri-
butes(5), isalist(5)
SunOS 5.9 Last change: 12 Mar 1999 2
阅读(1669) | 评论(0) | 转发(0) |