LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1969|回复: 5

arch是个什么命令?

[复制链接]
发表于 2007-11-4 10:07:12 | 显示全部楼层 |阅读模式
在装pgi7.0.5时遇到的:
type arch > /dev/null 2>&1
if test $? -ne 0 ; then
  echo
  echo "ERROR: arch not found (PATH = \$PATH)"
  quit
fi

我用的是debian,到这里就退出了,另外,type是什么啊?
 楼主| 发表于 2007-11-5 11:06:30 | 显示全部楼层
不管是什么命令,已经采取措施跳过去了,能正常安装了。
回复 支持 反对

使用道具 举报

发表于 2007-11-5 12:20:17 | 显示全部楼层
虽然迟到了, 但对于以后来看帖子的人也许还有用

man arch

  1. ARCH(1)                    Linux Programmer’s Manual                   ARCH(1)

  2. NAME
  3.        arch - print machine architecture

  4. SYNOPSIS
  5.        arch

  6. DESCRIPTION
  7.        arch is equivalent to uname -m.

  8.        On  current  Linux  systems, arch prints things such as "i386", "i486",
  9.        "i586", "alpha", "sparc", "arm", "m68k", "mips", "ppc".

  10. SEE ALSO
  11.        uname(1), uname(2)

  12. Linux 2.0                         4 July 1997                          ARCH(1)
复制代码


  1. $ type type
  2. type is a shell builtin
  3. $ help type
  4. type: type [-afptP] name [name ...]
  5.     For each NAME, indicate how it would be interpreted if used as a
  6.     command name.

  7.     If the -t option is used, `type' outputs a single word which is one of
  8.     `alias', `keyword', `function', `builtin', `file' or `', if NAME is an
  9.     alias, shell reserved word, shell function, shell builtin, disk file,
  10.     or unfound, respectively.

  11.     If the -p flag is used, `type' either returns the name of the disk
  12.     file that would be executed, or nothing if `type -t NAME' would not
  13.     return `file'.

  14.     If the -a flag is used, `type' displays all of the places that contain
  15.     an executable named `file'.  This includes aliases, builtins, and
  16.     functions, if and only if the -p flag is not also used.

  17.     The -f flag suppresses shell function lookup.

  18.     The -P flag forces a PATH search for each NAME, even if it is an alias,
  19.     builtin, or function, and returns the name of the disk file that would
  20.     be executed.
  21. typeset: typeset [-afFirtx] [-p] name[=value] ...
  22.     Obsolete.  See `declare'.
  23. $ type arch
  24. arch is hashed (/bin/arch)
  25. $ arch
  26. i686
复制代码


arch 等同于 uname -m, 而 type 是查看一个命令的类型的. 在楼主的例子中, 就是检测 arch 命令是否存在于 PATH 中
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-7 13:12:42 | 显示全部楼层
arch属于哪个软件包?
我在debian下找不到这个软件或命令。
回复 支持 反对

使用道具 举报

发表于 2007-11-7 23:01:53 | 显示全部楼层
真遗憾, 我也是在单位的 FC4 上找到它的
回复 支持 反对

使用道具 举报

发表于 2007-11-8 08:33:27 | 显示全部楼层
arch是查看机器体系结构的,就是386,486这种。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表