linux du command source code

帅比萌擦擦* 提交于 2019-12-30 04:03:13

问题


Where I can find the source code for du and other Linux utilities?


回答1:


It is with the GNU CoreUtils package.




回答2:


David is right. You can start with the entry point, du.c, in Savannah. Also, since it's free software under the GPL, you can also get it from your GNU/Linux distribution. E.g., on Debian or Ubuntu you can generally just do:

apt-get source coreutils

to get the source for the version installed.


(EDIT by Novelocrat)

For other commands, to find out what package they're in, you can say

dpkg -S `which command`

which command will tell you the full path to that command, and dpkg -S filename will tell you what package provides a file. Then you can run apt-get source packagename to get its source code.



来源:https://stackoverflow.com/questions/3264843/linux-du-command-source-code

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!