开发者

source code about commands

where can I found source files (in C language开发者_开发问答) about unix Commands (ls, sleep, cd etc).

I've downloaded the kernel linux-2.6.39-rc3, but there are no source about linux command.

thanks for your help :-)


Most of the generic Linux commands come from coreutils http://www.gnu.org/software/coreutils/ there might be some missing there, but everything you asked specifically about should be found in coreutils source.

the kernel source doesn't contain any userland programs in it.


If you are using debian based os then u can use

dpkg -S command

to find the package it is present in and then

apt-get source package 

to download the source. You can find similar commands on other machines.


Pickup the GNU coreutils @ http://ftp.gnu.org/pub/gnu/coreutils/ and this includes a lot of these commands.


use

sudo apt-get build-dep core-utils
apt-get source core-utils --compile

to get and compile everything in core-utils from scratch

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜