linux的shell命令源码在哪能找到?比如find的源码

一、rpm -qif `which find` | grep "Source RPM" | awk '{print $NF}'

1
2
[root@saltstack ~]# rpm -qif `which find` | grep "Source RPM" | awk '{print $NF}'
findutils-4.5.11-5.el7.src.rpm

二、去rpmfind.net搜索关键字findutils

 

 

 

三、下载findutils-4.5.11-6.el7.src.rpm

 

 

 

 四、上传、查看源码包

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
[root@ceph-1 shell]# rz -y
[root@ceph-1 shell]# ls
findutils-4.5.11-6.el7.src.rpm
[root@ceph-1 shell]# rpm2cpio findutils-4.5.11-6.el7.src.rpm| cpio -idv
findutils-4.4.0-no-locate.patch
findutils-4.4.2-autofs.patch
findutils-4.4.2-xautofs.patch
findutils-4.5.11-bz1116237.patch
findutils-4.5.11-fd-leak.patch
findutils-4.5.11-ppc-gnulib-tests.patch
findutils-4.5.11.tar.gz
findutils-4.5.7-warnings.patch
findutils.spec
6181 blocks
[root@ceph-1 shell]# ls
 findutils-4.4.0-no-locate.patch  findutils-4.5.11-6.el7.src.rpm    findutils-4.5.11-ppc-gnulib-tests.patch  findutils.spec
 findutils-4.4.2-autofs.patch     findutils-4.5.11-bz1116237.patch  findutils-4.5.11.tar.gz                 
 findutils-4.4.2-xautofs.patch    findutils-4.5.11-fd-leak.patch    findutils-4.5.7-warnings.patch          
[root@ceph-1 shell]# tar xf findutils-4.5.11.tar.gz
[root@ceph-1 shell]# ls
findutils-4.5.11                 findutils-4.5.11-ppc-gnulib-tests.patch
findutils-4.4.0-no-locate.patch  findutils-4.5.11-6.el7.src.rpm    findutils-4.5.11.tar.gz
findutils-4.4.2-autofs.patch     findutils-4.5.11-bz1116237.patch  findutils-4.5.7-warnings.patch
findutils-4.4.2-xautofs.patch    findutils-4.5.11-fd-leak.patch    findutils.spec
[root@ceph-1 shell]# cd findutils-4.5.11/
[root@ceph-1 findutils-4.5.11]# ll
total 2264
-rw-r--r-- 1 root root   93787 Nov 18  2012 ABOUT-NLS
-rw-r--r-- 1 root root   44337 Feb  2  2013 aclocal.m4
-rw-r--r-- 1 root root    1331 Nov 17  2012 AUTHORS
drwxr-xr-x 3 root root    4096 Feb  2  2013 build-aux
-rw-r--r-- 1 root root  411052 Feb  2  2013 ChangeLog
-rw-r--r-- 1 root root   91938 Feb  2  2013 config.h.in
-rwxr-xr-x 1 root root 1294667 Feb  2  2013 configure
-rw-r--r-- 1 root root    8331 Feb  2  2013 configure.ac
-rw-r--r-- 1 root root   35068 Aug 21  2011 COPYING
drwxr-xr-x 2 root root    4096 Feb  2  2013 doc
drwxr-xr-x 3 root root     328 Feb  2  2013 find
drwxr-xr-x 4 root root      65 Feb  2  2013 gl
-rw-r--r-- 1 root root    4573 Dec 15  2012 GNUmakefile
-rw-r--r-- 1 root root    2376 Feb  2  2013 import-gnulib.config
-rwxr-xr-x 1 root root   11410 Nov 17  2012 import-gnulib.sh
-rw-r--r-- 1 root root   15578 Nov 18  2012 INSTALL
drwxr-xr-x 2 root root    4096 Feb  2  2013 lib
drwxr-xr-x 3 root root     252 Feb  2  2013 locate
drwxr-xr-x 2 root root     185 Feb  2  2013 m4
-rw-r--r-- 1 root root   62820 Dec 15  2012 maint.mk
-rw-r--r-- 1 root root    2142 Nov 17  2012 Makefile.am
-rw-r--r-- 1 root root   70020 Feb  2  2013 Makefile.in
-rw-r--r-- 1 root root   68339 Feb  2  2013 NEWS
drwxr-xr-x 2 root root    4096 Feb  2  2013 po
-rw-r--r-- 1 root root    3177 Nov 17  2012 README
-rw-r--r-- 1 root root    1049 Nov 17  2012 README-alpha
-rw-r--r-- 1 root root    7541 Nov 17  2012 README-hacking
-rw-r--r-- 1 root root      10 Aug 21  2011 stamp-h.in
drwxr-xr-x 4 root root   12288 Feb  2  2013 tests
-rw-r--r-- 1 root root    1418 Nov 13  2012 THANKS
-rw-r--r-- 1 root root    3084 Nov 17  2012 TODO
-rw-r--r-- 1 root root    1968 Feb  2  2013 tool-versions.txt
drwxr-xr-x 3 root root      91 Feb  2  2013 xargs
[root@ceph-1 findutils-4.5.11]# cd find/
[root@ceph-1 find]# ll
total 524
-rw-r--r-- 1 root root 19855 Feb  2  2013 defs.h
-rw-r--r-- 1 root root  9645 Feb  2  2013 exec.c
-rw-r--r-- 1 root root 62856 Nov 17  2012 find.1
-rw-r--r-- 1 root root 43590 Feb  2  2013 find.c
-rw-r--r-- 1 root root  1094 Nov 17  2012 finddata.c
-rw-r--r-- 1 root root  7489 Nov 17  2012 fstype.c
-rw-r--r-- 1 root root   873 Nov 17  2012 ftsfind.1
-rw-r--r-- 1 root root 19264 Feb  2  2013 ftsfind.c
-rw-r--r-- 1 root root  2440 Nov 17  2012 Makefile.am
-rw-r--r-- 1 root root 75571 Feb  2  2013 Makefile.in
-rw-r--r-- 1 root root   877 Nov 17  2012 oldfind.1
-rw-r--r-- 1 root root 99771 Nov 17  2012 parser.c
-rw-r--r-- 1 root root 35248 Nov 17  2012 pred.c
-rw-r--r-- 1 root root 34672 Feb  2  2013 print.c
-rw-r--r-- 1 root root   387 Nov 17  2012 print.h
-rw-r--r-- 1 root root  4278 Nov 17  2012 sharefile.c
-rw-r--r-- 1 root root  1048 Nov 17  2012 sharefile.h
drwxr-xr-x 5 root root   264 Feb  2  2013 testsuite
-rw-r--r-- 1 root root 46874 Nov 17  2012 tree.c
-rw-r--r-- 1 root root 27761 Feb  2  2013 util.c
[root@ceph-1 find]# vim find.c

  

posted @   活的潇洒80  阅读(1681)  评论(0编辑  收藏  举报
编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
历史上的今天:
2019-08-29 深入浅出计算机组成原理学习笔记:第十九讲
2019-08-29 深入浅出计算机组成原理学习笔记:第十八讲
点击右上角即可分享
微信分享提示