LinuxSir.cn,穿越时空的Linuxsir!

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

bash内置的命令都放在哪里的?

[复制链接]
发表于 2007-7-14 10:41:39 | 显示全部楼层 |阅读模式
bash的外部系统命令似乎都放在 /bin   /usr/bin下

但是bash内置的命令如cd,是放在哪里的呢?就是bash本身?已经集成进去了?
发表于 2007-7-14 11:14:42 | 显示全部楼层
/bin/sh ?
回复 支持 反对

使用道具 举报

发表于 2007-7-14 14:34:50 | 显示全部楼层
Post by goodluckyes
bash的外部系统命令似乎都放在 /bin   /usr/bin下

但是bash内置的命令如cd,是放在哪里的呢?就是bash本身?已经集成进去了?
不是 bash 本身,是 coreutils 的

很多时候在迷你系统里,也可透过 busybox 集成
回复 支持 反对

使用道具 举报

发表于 2007-7-14 15:18:12 | 显示全部楼层
??
APPLICATION USAGE

    Since cd affects the current shell execution environment, it is always provided as a shell regular built-in. If it is called in a subshell or separate utility execution environment, such as one of the following:

    (cd /tmp)
    nohup cd
    find . -exec cd {} \;

    it does not affect the working directory of the caller's environment.

    The user must have execute (search) permission in directory in order to change to it.

http://www.opengroup.org/onlinepubs/009695399/utilities/cd.html
回复 支持 反对

使用道具 举报

发表于 2007-7-14 15:28:36 | 显示全部楼层
不好意思,原来是 cd,看错了,以为是 cp :p
回复 支持 反对

使用道具 举报

发表于 2007-7-14 15:31:37 | 显示全部楼层
我说呢	
回复 支持 反对

使用道具 举报

发表于 2007-7-14 17:31:15 | 显示全部楼层
在 bash source 包 的 builtins 目录下有你要的答案
回复 支持 反对

使用道具 举报

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

本版积分规则

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