全部博文(22)
分类: LINUX
2010-02-20 18:07:54
As I would like to study how to code the shell tools, ls and dd, etc., the code must be found first? But where is the code in Linux or Unix?
This problem is just how to find the code of ls?
Here is one way to answer:
1. $ which/whereis ls, to find the ls, also using locate, find
2. $ dpkg -S /bin/ls, to find which package ls belongs to, here is coreutils
3. $ apt-get source xxx(package name)
4. $ sudo apt-get build-dep xxx, in an attempt to satisfy the build dependencies for a source package