首页 > 系统 > Linux > 正文

Linux 查看命令源码

2024-06-28 13:19:42
字体:
来源:转载
供稿:网友
linux 查看命令源码

一、简介

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

二、方法

参考:

http://blog.csdn.net/silentpebble/article/details/41279285http://blog.csdn.net/zhenwo123/article/details/19190189

以查看uname命令源码为例进行说明,步骤如下:

# 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

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表