一、簡(jiǎn)介
有時(shí)候想看看ls、cat、more等命令的源代碼,本文介紹相應(yīng)查看方法。
二、方法
參考:
http://blog.csdn.net/silentpebble/article/details/41279285http://blog.csdn.net/zhenwo123/article/details/19190189
以查看uname命令源碼為例進(jìn)行說(shuō)明,步驟如下:
# whereis unameuname: /bin/uname /usr/share/man/man1/uname.1.gz /usr/share/man/man2/uname.2.gz /usr/share/man
# rpm -qf /bin/uname
coreutils-8.5-7.fc14.i686
# yumdownloader --source coreutils-8.5-7.fc14.i686
# rpm2cpio coreutils-8.5-7.fc14.src.rpm | cpio -idv coreutils-8.5.tar.xz
coreutils-8.5.tar.xz
9446 blocks
# tar xjvf coreutils-8.5.tar.xz
三、源碼分析
參考:
http://blog.csdn.net/yxc135/article/details/22161907
新聞熱點(diǎn)
疑難解答
圖片精選