linux du命令源代码

Arp*_*pit 12 c linux kernel

在哪里可以找到du其他Linux实用程序的源代码?

小智 14

它与GNU CoreUtils包一起使用.


Mat*_*hen 11

大卫是对的.你可以从萨凡纳的入口点du.c开始.此外,由于它是GPL下的免费软件,您也可以从GNU/Linux发行版中获取它.例如,在Debian或Ubuntu上,您通常可以这样做:

apt-get source coreutils
Run Code Online (Sandbox Code Playgroud)

获取安装版本的源代码.


(由Novelocrat编辑)

对于其他命令,可以说,找出它们所在的包

dpkg -S `which command`
Run Code Online (Sandbox Code Playgroud)

which command将告诉你该命令的完整路径,并dpkg -S filename告诉你哪个包提供了一个文件.然后你可以运行apt-get source packagename以获取其源代码.

  • “du.c”+1。它让我不用下载整个包 (2认同)