在哪里可以找到Linux核心命令的源代码? [英] Where can I find source code for Linux core commands?

查看:138
本文介绍了在哪里可以找到Linux核心命令的源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想读取linux命令所写的实际代码。我已经获得了一些使用它们的经验,现在我认为是时候与我的机器进行更深层次的互动。我在这里找到了一些命令 http://directory.fsf.org/wiki/GNU

I'd like to read the actual code which the linux commands are written with. I've gained some experience using them and now I think it's time to interact with my machine at a deeper level. I've found some commands here http://directory.fsf.org/wiki/GNU.

不幸的是,我不能找到基本命令,如'ls',这似乎在我容易开始。

Unfortunately I wasn't able to find basic commands such as 'ls' which seems to me easy enough to begin.

你碰巧知道一些网页,书籍或任何其他东西开始吗?

Do you happen to know some web page, book or any other stuff to begin?

我在Ubuntu 12.04上运行

I'm running on Ubuntu 12.04

推荐答案

命令是 coreutils 包的一部分。

您可以在此处找到所需的所有信息:

You can find all information you need here:

http://www.gnu.org/software/coreutils/

如果你想下载最新的源代码,你应该使用git:

If you want to download the latest source, you should use git:

git clone git://git.sv.gnu.org/coreutils

要在你的Ubuntu机器上安装git,你应该使用apt-get (git不包括在标准Ubuntu安装中):

To install git on your Ubuntu machine, you should use apt-get (git is not included in the standard Ubuntu installation):

sudo apt-get install git

要告诉的真理,这里可以找到 ls 命令的具体来源:

Truth to be told, here you can find specific source for the ls command:

http://git.savannah.gnu.org/cgit /coreutils.git/tree/src/ls.c

只有4984个代码行用于命令easy enoughas ls ...你还有兴趣阅读吗?祝你好运! :D

Only 4984 code lines for a command 'easy enough' as ls... are you still interested in reading it?? Good luck! :D

这篇关于在哪里可以找到Linux核心命令的源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆