|
发表于 2007-11-5 12:20:17
|
显示全部楼层
虽然迟到了, 但对于以后来看帖子的人也许还有用
man arch
- ARCH(1) Linux Programmer’s Manual ARCH(1)
- NAME
- arch - print machine architecture
- SYNOPSIS
- arch
- DESCRIPTION
- arch is equivalent to uname -m.
- On current Linux systems, arch prints things such as "i386", "i486",
- "i586", "alpha", "sparc", "arm", "m68k", "mips", "ppc".
- SEE ALSO
- uname(1), uname(2)
- Linux 2.0 4 July 1997 ARCH(1)
复制代码
- $ type type
- type is a shell builtin
- $ help type
- type: type [-afptP] name [name ...]
- For each NAME, indicate how it would be interpreted if used as a
- command name.
- If the -t option is used, `type' outputs a single word which is one of
- `alias', `keyword', `function', `builtin', `file' or `', if NAME is an
- alias, shell reserved word, shell function, shell builtin, disk file,
- or unfound, respectively.
- If the -p flag is used, `type' either returns the name of the disk
- file that would be executed, or nothing if `type -t NAME' would not
- return `file'.
- If the -a flag is used, `type' displays all of the places that contain
- an executable named `file'. This includes aliases, builtins, and
- functions, if and only if the -p flag is not also used.
- The -f flag suppresses shell function lookup.
- The -P flag forces a PATH search for each NAME, even if it is an alias,
- builtin, or function, and returns the name of the disk file that would
- be executed.
- typeset: typeset [-afFirtx] [-p] name[=value] ...
- Obsolete. See `declare'.
- $ type arch
- arch is hashed (/bin/arch)
- $ arch
- i686
复制代码
arch 等同于 uname -m, 而 type 是查看一个命令的类型的. 在楼主的例子中, 就是检测 arch 命令是否存在于 PATH 中 |
|