1. linux 命令分为 bash 内建和 coreutils 包命令。

Ubuntu可以方便的获取:
sudo apt-get source coreutils
sudo apt-get source bash

red hat

rpm -qif  path/commond得到commond源代码包下载网站或可以使用www.rpmfind.net
若是tar.gz 则解压即可

若是src.rpm,则先运行rpm2cpio xxx.src.rpm| cpio -idv 得到 tar.gz

2. bash 内建需要看shell源代码,coreutils 包中的可以在GNU 的站点http://www.gnu.org/software/coreutils/coreutils.html查看。