偶尔看到了这个命令,不知道是什么,在电脑中试验了一下也看不出什么所以来,上网查了一下得到:
“nash是linux内核引导时initrd中常用的一个简单的类似于shell的工具,说它类似主要是因为它只能执行一些内嵌的命令,如mount、mkdir、pivot_root、mkrootdev等等,要执行外部命令只能用内嵌的exec命令来调用,可一旦这样就将整个进程的执行映像都替换了,脚本中后面的命令就再也不能得以执行了,我现在想让它能够像一般shell那样地执行外部命令。 ”
“From nash and execve man page:
Nash is not a shell, and it shouldn't be
thought of as one. It isn't entirely different from a
shell, but that's mostly by accident.
There are two types of commands, built in and external.
External commands are run from the filesystem via
execve().
execve() does not return on success, and the text, data,
bss, and stack of the calling process are overwritten by
that of the program loaded. The program invoked inherits
the calling process's PID, and any open file descriptors
that are not set to close on exec.
”
有没有高手能不能,举例介绍一下这个命令啊 谢谢了
二十七 于 2009-10-28 13:07:12发表:
很少接触到这个命令,都停留在基础的应用..
shenhao0129 于 2009-10-28 12:28:09发表:
完全的没有用过
l460618498 于 2009-10-28 09:58:58发表:
你man一下