您的位置:首页 > 运维架构 > Linux

Linux 查看命令源码

2015-07-15 00:19 369 查看
一、简介

有时候想看看ls、cat、more等命令的源代码,本文介绍相应查看方法。

二、方法

参考:

http://blog.csdn.net/silentpebble/article/details/41279285'target='_blank'>http://blog.csdn.net/zhenwo123/article/details/19190189[/code]
以查看uname命令源码为例进行说明,步骤如下:

#whereisuname
uname:/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--sourcecoreutils-8.5-7.fc14.i686
#rpm2cpiocoreutils-8.5-7.fc14.src.rpm|cpio-idvcoreutils-8.5.tar.xz

coreutils-8.5.tar.xz
9446blocks
#tarxjvfcoreutils-8.5.tar.xz


三、源码分析

参考:

http://blog.csdn.net/yxc135/article/details/22161907
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: