参考文献
yum でソースコードをダウンロードしたいLinuxコマンドのソースコードを取得する方法:オリジナルコマンド作成前の勉強向け
coreutilsためしにいれてみる
コード表示
[oracle@centos ~]$ sudo yum install -y yum-utils
[oracle@centos ~]$ which ls
alias ls='ls --color=auto'
/usr/bin/ls
[oracle@centos ~]$ yum whatprovides /usr/bin/ls
読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* centos-qemu-ev: ftp.iij.ad.jp
* epel: ftp.yz.yamagata-u.ac.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
coreutils-8.22-23.el7.x86_64 : A set of basic GNU tools commonly used in shell scripts
リポジトリー : base
一致 :
ファイル名 : /usr/bin/ls
coreutils-8.22-23.el7.x86_64 : A set of basic GNU tools commonly used in shell scripts
リポジトリー : @base
一致 :
ファイル名 : /usr/bin/ls
[oracle@centos ~]$ sudo yumdownloader --source coreutils-8.22-23.el7.x86_64
[oracle@centos ~]$ find / -name "*coreutils-8.22-23.el7.src.rpm*" 2>/dev/null
/home/oracle/coreutils-8.22-23.el7.src.rpm
[oracle@centos ~]$ ll
合計 380472
-rw-r--r--. 1 oracle docker 383991324 5月 24 04:19 CentOS-7-x86_64-Vagrant-1902_01.Libvirt.box
drwxr-xr-x. 2 oracle docker 4096 6月 23 08:39 Desktop
drwxr-xr-x. 2 oracle docker 4096 6月 14 09:25 Documents
drwxr-xr-x. 2 oracle docker 4096 6月 22 15:06 Downloads
drwxr-xr-x. 2 oracle docker 4096 5月 12 16:16 Music
drwxr-xr-x. 2 oracle docker 4096 6月 14 20:02 Pictures
drwxr-xr-x. 2 oracle docker 4096 5月 12 16:16 Public
drwxr-xr-x. 2 oracle docker 4096 5月 12 16:16 Templates
drwxr-xr-x. 2 oracle docker 4096 5月 12 16:16 Videos
-rw-r--r--. 1 root root 5518732 11月 13 2018 coreutils-8.22-23.el7.src.rpm
drwxr-xr-x. 25 oracle docker 4096 5月 25 12:58 docker-images
drwxr-xr-x. 4 oracle docker 4096 6月 3 06:33 doclan
drwxr-xr-x. 7 oracle docker 4096 6月 3 22:00 ff
drwxr-xr-x. 2 oracle docker 4096 6月 14 13:18 gg
drwxr-xr-x. 3 oracle docker 4096 5月 25 15:01 jj
drwxr-xr-x. 6 oracle docker 4096 6月 6 23:23 kk
drwxr-xr-x. 9 oracle docker 4096 6月 9 18:22 pp
drwxr-xr-x. 11 oracle docker 4096 6月 23 08:00 rr
drwxr-xr-x. 2 oracle docker 4096 6月 21 07:38 tmp
drwxr-xr-x. 4 oracle docker 4096 6月 7 19:45 tt
drwxr-xr-x. 7 oracle docker 4096 6月 7 01:06 vx
drwxr-xr-x. 4 oracle docker 4096 5月 25 10:29 weban
[oracle@centos ~]$ mkdir centos_coreutils
[oracle@centos ~]$ ll
合計 380476
-rw-r--r--. 1 oracle docker 383991324 5月 24 04:19 CentOS-7-x86_64-Vagrant-1902_01.Libvirt.box
drwxr-xr-x. 2 oracle docker 4096 6月 23 08:40 Desktop
drwxr-xr-x. 2 oracle docker 4096 6月 14 09:25 Documents
drwxr-xr-x. 2 oracle docker 4096 6月 22 15:06 Downloads
drwxr-xr-x. 2 oracle docker 4096 5月 12 16:16 Music
drwxr-xr-x. 2 oracle docker 4096 6月 14 20:02 Pictures
drwxr-xr-x. 2 oracle docker 4096 5月 12 16:16 Public
drwxr-xr-x. 2 oracle docker 4096 5月 12 16:16 Templates
drwxr-xr-x. 2 oracle docker 4096 5月 12 16:16 Videos
drwxr-xr-x. 2 oracle docker 4096 6月 23 08:42 centos_coreutils
-rw-r--r--. 1 root root 5518732 11月 13 2018 coreutils-8.22-23.el7.src.rpm
drwxr-xr-x. 25 oracle docker 4096 5月 25 12:58 docker-images
drwxr-xr-x. 4 oracle docker 4096 6月 3 06:33 doclan
drwxr-xr-x. 7 oracle docker 4096 6月 3 22:00 ff
drwxr-xr-x. 2 oracle docker 4096 6月 14 13:18 gg
drwxr-xr-x. 3 oracle docker 4096 5月 25 15:01 jj
drwxr-xr-x. 6 oracle docker 4096 6月 6 23:23 kk
drwxr-xr-x. 9 oracle docker 4096 6月 9 18:22 pp
drwxr-xr-x. 11 oracle docker 4096 6月 23 08:00 rr
drwxr-xr-x. 2 oracle docker 4096 6月 21 07:38 tmp
drwxr-xr-x. 4 oracle docker 4096 6月 7 19:45 tt
drwxr-xr-x. 7 oracle docker 4096 6月 7 01:06 vx
drwxr-xr-x. 4 oracle docker 4096 5月 25 10:29 weban
[oracle@centos ~]$ cd centos_coreutils
[oracle@centos centos_coreutils]$ pwd
/home/oracle/centos_coreutils
[oracle@centos centos_coreutils]$ ll
合計 5744
-rw-rw-r--. 1 oracle docker 868 6月 23 08:44 coreutils-4.5.3-langinfo.patch
-rw-rw-r--. 1 oracle docker 5427 6月 23 08:44 coreutils-6.10-configuration.patch
-rw-rw-r--. 1 oracle docker 576 6月 23 08:44 coreutils-6.10-manpages.patch
-rw-rw-r--. 1 oracle docker 617 6月 23 08:44 coreutils-7.4-sttytcsadrain.patch
-rw-rw-r--. 1 oracle docker 1471 6月 23 08:44 coreutils-8.2-uname-processortype.patch
-rw-rw-r--. 1 oracle docker 3758 6月 23 08:44 coreutils-8.22-cp-selinux.patch
-rw-rw-r--. 1 oracle docker 11416 6月 23 08:44 coreutils-8.22-cp-sparsecorrupt.patch
-rw-rw-r--. 1 oracle docker 1633 6月 23 08:44 coreutils-8.22-date-emptyTZ.patch
-rw-rw-r--. 1 oracle docker 16663 6月 23 08:44 coreutils-8.22-dd-progress.patch
-rw-rw-r--. 1 oracle docker 1575 6月 23 08:44 coreutils-8.22-df-autofs.patch
-rw-rw-r--. 1 oracle docker 18860 6月 23 08:44 coreutils-8.22-df-filtermountlistupdate.patch
-rw-rw-r--. 1 oracle docker 3651 6月 23 08:44 coreutils-8.22-df-getdisk.patch
-rw-rw-r--. 1 oracle docker 2773 6月 23 08:44 coreutils-8.22-df-stat.patch
-rw-rw-r--. 1 oracle docker 5801 6月 23 08:44 coreutils-8.22-du-bindmountcycles.patch
-rw-rw-r--. 1 oracle docker 1363 6月 23 08:44 coreutils-8.22-failingtests.patch
-rw-rw-r--. 1 oracle docker 1477 6月 23 08:44 coreutils-8.22-id-groups.patch
-rw-rw-r--. 1 oracle docker 6854 6月 23 08:44 coreutils-8.22-ls-interruption.patch
-rw-rw-r--. 1 oracle docker 14467 6月 23 08:44 coreutils-8.22-mv-hardlinksrace.patch
-rw-rw-r--. 1 oracle docker 37417 6月 23 08:44 coreutils-8.22-mv-n-noreplace.patch
-rw-rw-r--. 1 oracle docker 6740 6月 23 08:44 coreutils-8.22-newfilesystems.patch
-rw-rw-r--. 1 oracle docker 10225 6月 23 08:44 coreutils-8.22-non-defaulttests.patch
-rw-rw-r--. 1 oracle docker 1895 6月 23 08:44 coreutils-8.22-ppc64le.patch
-rw-rw-r--. 1 oracle docker 4559 6月 23 08:44 coreutils-8.22-selinux-optionsseparate.patch
-rw-rw-r--. 1 oracle docker 1145 6月 23 08:44 coreutils-8.22-sort-blanks.patch
-rw-rw-r--. 1 oracle docker 563 6月 23 08:44 coreutils-8.22-temporarytestoff.patch
-rw-rw-r--. 1 oracle docker 588 6月 23 08:44 coreutils-8.22-vxfs-noinotify.patch
-rw-rw-r--. 1 oracle docker 1226 6月 23 08:44 coreutils-8.22-xfs-tests.patch
-rw-rw-r--. 1 oracle docker 2593 6月 23 08:44 coreutils-8.22-xfsbuildfailure.patch
-rw-rw-r--. 1 oracle docker 5335124 6月 23 08:44 coreutils-8.22.tar.xz
-rw-rw-r--. 1 oracle docker 685 6月 23 08:44 coreutils-8.4-mkdir-modenote.patch
-rw-rw-r--. 1 oracle docker 5090 6月 23 08:44 coreutils-DIR_COLORS
-rw-rw-r--. 1 oracle docker 5725 6月 23 08:44 coreutils-DIR_COLORS.256color
-rw-rw-r--. 1 oracle docker 4669 6月 23 08:44 coreutils-DIR_COLORS.lightbgcolor
-rwxrwxr-x. 1 oracle docker 1741 6月 23 08:44 coreutils-colorls.csh
-rwxrwxr-x. 1 oracle docker 1606 6月 23 08:44 coreutils-colorls.sh
-rw-rw-r--. 1 oracle docker 6026 6月 23 08:44 coreutils-df-direct.patch
-rw-rw-r--. 1 oracle docker 2291 6月 23 08:44 coreutils-getgrouplist.patch
-rw-rw-r--. 1 oracle docker 2509 6月 23 08:44 coreutils-i18n-fold-newline.patch
-rw-rw-r--. 1 oracle docker 3070 6月 23 08:44 coreutils-i18n-sort-memleak.patch
-rw-rw-r--. 1 oracle docker 147328 6月 23 08:44 coreutils-i18n.patch
-rw-rw-r--. 1 oracle docker 331 6月 23 08:44 coreutils-overflow.patch
-rw-rw-r--. 1 oracle docker 19930 6月 23 08:44 coreutils-selinux.patch
-rw-rw-r--. 1 oracle docker 2249 6月 23 08:44 coreutils-selinuxmanpages.patch
-rw-rw-r--. 1 oracle docker 72699 6月 23 08:44 coreutils.spec
-rw-rw-r--. 1 oracle docker 590 6月 23 08:44 sh-utils-2.0.11-dateman.patch
[oracle@centos centos_coreutils]$ tar -xvf coreutils-8.22.tar.xz
[oracle@centos src]$ ll
合計 2808
-rw-r--r--. 1 oracle docker 8640 12月 4 2013 base64.c
-rw-r--r--. 1 oracle docker 4919 12月 4 2013 basename.c
-rw-r--r--. 1 oracle docker 5290 12月 4 2013 c99-to-c89.diff
-rw-r--r--. 1 oracle docker 22725 12月 4 2013 cat.c
-rw-r--r--. 1 oracle docker 16355 12月 4 2013 chcon.c
-rw-r--r--. 1 oracle docker 8836 12月 4 2013 chgrp.c
-rw-r--r--. 1 oracle docker 15845 12月 4 2013 chmod.c
-rw-r--r--. 1 oracle docker 17246 12月 4 2013 chown-core.c
-rw-r--r--. 1 oracle docker 2281 12月 4 2013 chown-core.h
-rw-r--r--. 1 oracle docker 10116 12月 4 2013 chown.c
-rw-r--r--. 1 oracle docker 6821 12月 4 2013 chroot.c
-rw-r--r--. 1 oracle docker 9879 12月 4 2013 cksum.c
-rw-r--r--. 1 oracle docker 12863 12月 4 2013 comm.c
-rw-r--r--. 1 oracle docker 102362 12月 5 2013 copy.c
-rw-r--r--. 1 oracle docker 10637 12月 4 2013 copy.h
-rw-r--r--. 1 oracle docker 4645 12月 4 2013 cp-hash.c
-rw-r--r--. 1 oracle docker 204 12月 4 2013 cp-hash.h
-rw-r--r--. 1 oracle docker 39399 12月 5 2013 cp.c
-rw-r--r--. 1 oracle docker 39607 12月 4 2013 csplit.c
-r--r--r--. 1 oracle docker 3209 12月 13 2013 cu-progs.mk
-rw-r--r--. 1 oracle docker 22606 12月 4 2013 cut.c
-rw-r--r--. 1 oracle docker 16993 12月 4 2013 date.c
-rwxr-xr-x. 1 oracle docker 1334 12月 4 2013 dcgen
-rw-r--r--. 1 oracle docker 72722 12月 4 2013 dd.c
-rw-r--r--. 1 oracle docker 46625 12月 4 2013 df.c
-rw-r--r--. 1 oracle docker 12875 12月 4 2013 dircolors.c
-r--r--r--. 1 oracle docker 18409 12月 9 2013 dircolors.h
-rw-r--r--. 1 oracle docker 4582 12月 4 2013 dircolors.hin
-rw-r--r--. 1 oracle docker 3188 12月 4 2013 dirname.c
-rw-r--r--. 1 oracle docker 33767 12月 4 2013 du.c
-rw-r--r--. 1 oracle docker 7630 12月 4 2013 echo.c
-rw-r--r--. 1 oracle docker 4387 12月 4 2013 env.c
-rw-r--r--. 1 oracle docker 11212 12月 4 2013 expand.c
-rw-r--r--. 1 oracle docker 21189 12月 4 2013 expr.c
-rw-r--r--. 1 oracle docker 7620 12月 4 2013 extent-scan.c
-rw-r--r--. 1 oracle docker 2099 12月 4 2013 extent-scan.h
-rw-r--r--. 1 oracle docker 4637 12月 4 2013 extract-magic
-rw-r--r--. 1 oracle docker 74954 12月 4 2013 factor.c
-rw-r--r--. 1 oracle docker 51 12月 4 2013 false.c
-rw-r--r--. 1 oracle docker 3052 12月 4 2013 fiemap.h
-rw-r--r--. 1 oracle docker 3345 12月 4 2013 find-mount-point.c
-rw-r--r--. 1 oracle docker 836 12月 4 2013 find-mount-point.h
-rw-r--r--. 1 oracle docker 28532 12月 4 2013 fmt.c
-rw-r--r--. 1 oracle docker 8195 12月 4 2013 fold.c
-r--r--r--. 1 oracle docker 3921 12月 13 2013 fs-is-local.h
-r--r--r--. 1 oracle docker 3571 12月 13 2013 fs.h
-rw-r--r--. 1 oracle docker 5221 12月 4 2013 getlimits.c
-rw-r--r--. 1 oracle docker 3121 12月 4 2013 group-list.c
-rw-r--r--. 1 oracle docker 865 12月 4 2013 group-list.h
-rw-r--r--. 1 oracle docker 3837 12月 4 2013 groups.c
-rw-r--r--. 1 oracle docker 32194 12月 4 2013 head.c
-rw-r--r--. 1 oracle docker 2355 12月 4 2013 hostid.c
-rw-r--r--. 1 oracle docker 3107 12月 4 2013 hostname.c
-rw-r--r--. 1 oracle docker 12624 12月 4 2013 id.c
-rw-r--r--. 1 oracle docker 30866 12月 4 2013 install.c
-rw-r--r--. 1 oracle docker 2710 12月 4 2013 ioblksize.h
-rw-r--r--. 1 oracle docker 32132 12月 4 2013 join.c
-rw-r--r--. 1 oracle docker 8823 12月 4 2013 kill.c
-rw-r--r--. 1 oracle docker 37 12月 4 2013 lbracket.c
-rw-r--r--. 1 oracle docker 4724 12月 4 2013 libstdbuf.c
-rw-r--r--. 1 oracle docker 2605 12月 4 2013 link.c
-rw-r--r--. 1 oracle docker 21549 12月 4 2013 ln.c
-rw-r--r--. 1 oracle docker 17421 12月 4 2013 local.mk
-rw-r--r--. 1 oracle docker 2259 12月 4 2013 logname.c
-rw-r--r--. 1 oracle docker 78147 12月 4 2013 longlong.h
-rw-r--r--. 1 oracle docker 44 12月 4 2013 ls-dir.c
-rw-r--r--. 1 oracle docker 37 12月 4 2013 ls-ls.c
-rw-r--r--. 1 oracle docker 46 12月 4 2013 ls-vdir.c
-rw-r--r--. 1 oracle docker 151003 12月 4 2013 ls.c
-rw-r--r--. 1 oracle docker 201 12月 4 2013 ls.h
-rw-r--r--. 1 oracle docker 5766 12月 4 2013 make-prime-list.c
-rw-r--r--. 1 oracle docker 24492 12月 4 2013 md5sum.c
-rw-r--r--. 1 oracle docker 9062 12月 5 2013 mkdir.c
-rw-r--r--. 1 oracle docker 4933 12月 5 2013 mkfifo.c
-rw-r--r--. 1 oracle docker 8116 12月 5 2013 mknod.c
-rw-r--r--. 1 oracle docker 10046 12月 4 2013 mktemp.c
-rw-r--r--. 1 oracle docker 16286 12月 5 2013 mv.c
-rw-r--r--. 1 oracle docker 6035 12月 4 2013 nice.c
-rw-r--r--. 1 oracle docker 16275 12月 4 2013 nl.c
-rw-r--r--. 1 oracle docker 7907 12月 4 2013 nohup.c
-rw-r--r--. 1 oracle docker 3220 12月 4 2013 nproc.c
-rw-r--r--. 1 oracle docker 41966 12月 4 2013 numfmt.c
-rw-r--r--. 1 oracle docker 57126 12月 4 2013 od.c
-rw-r--r--. 1 oracle docker 2317 12月 4 2013 operand2sig.c
-rw-r--r--. 1 oracle docker 832 12月 4 2013 operand2sig.h
-rw-r--r--. 1 oracle docker 14970 12月 4 2013 paste.c
-rw-r--r--. 1 oracle docker 11819 12月 4 2013 pathchk.c
-rw-r--r--. 1 oracle docker 14943 12月 4 2013 pinky.c
-rw-r--r--. 1 oracle docker 86849 12月 4 2013 pr.c
-r--r--r--. 1 oracle docker 104356 12月 9 2013 primes.h
-rw-r--r--. 1 oracle docker 4059 12月 4 2013 printenv.c
-rw-r--r--. 1 oracle docker 19700 12月 4 2013 printf.c
-rw-r--r--. 1 oracle docker 1174 12月 4 2013 prog-fprintf.c
-rw-r--r--. 1 oracle docker 962 12月 4 2013 prog-fprintf.h
-rw-r--r--. 1 oracle docker 69914 12月 4 2013 ptx.c
-rw-r--r--. 1 oracle docker 10591 12月 4 2013 pwd.c
-rw-r--r--. 1 oracle docker 5112 12月 4 2013 readlink.c
-rw-r--r--. 1 oracle docker 7794 12月 4 2013 realpath.c
-rw-r--r--. 1 oracle docker 3654 12月 4 2013 relpath.c
-rw-r--r--. 1 oracle docker 918 12月 4 2013 relpath.h
-rw-r--r--. 1 oracle docker 19761 12月 4 2013 remove.c
-rw-r--r--. 1 oracle docker 3015 12月 4 2013 remove.h
-rw-r--r--. 1 oracle docker 10477 12月 4 2013 rm.c
-rw-r--r--. 1 oracle docker 6786 12月 4 2013 rmdir.c
-rw-r--r--. 1 oracle docker 8035 12月 4 2013 runcon.c
-rw-r--r--. 1 oracle docker 8986 12月 4 2013 selinux.c
-rw-r--r--. 1 oracle docker 1459 12月 5 2013 selinux.h
-rw-r--r--. 1 oracle docker 18070 12月 4 2013 seq.c
-rw-r--r--. 1 oracle docker 6033 12月 4 2013 setuidgid.c
-rw-r--r--. 1 oracle docker 40495 12月 4 2013 shred.c
-rw-r--r--. 1 oracle docker 17528 12月 9 2013 shuf.c
-rw-r--r--. 1 oracle docker 3913 12月 4 2013 sleep.c
-rw-r--r--. 1 oracle docker 143380 12月 4 2013 sort.c
-rw-r--r--. 1 oracle docker 46504 12月 4 2013 split.c
-rw-r--r--. 1 oracle docker 46255 12月 13 2013 stat.c
-rw-r--r--. 1 oracle docker 10090 12月 4 2013 stdbuf.c
-rw-r--r--. 1 oracle docker 55677 12月 4 2013 stty.c
-rw-r--r--. 1 oracle docker 6726 12月 4 2013 sum.c
-rw-r--r--. 1 oracle docker 1977 12月 4 2013 sync.c
-rw-r--r--. 1 oracle docker 18060 12月 5 2013 system.h
-rw-r--r--. 1 oracle docker 5973 12月 4 2013 tac-pipe.c
-rw-r--r--. 1 oracle docker 20994 12月 4 2013 tac.c
-rw-r--r--. 1 oracle docker 69842 12月 9 2013 tail.c
-rw-r--r--. 1 oracle docker 5705 12月 4 2013 tee.c
-rw-r--r--. 1 oracle docker 22830 12月 4 2013 test.c
-rw-r--r--. 1 oracle docker 15652 12月 4 2013 timeout.c
-rw-r--r--. 1 oracle docker 13015 12月 4 2013 touch.c
-rw-r--r--. 1 oracle docker 60347 12月 4 2013 tr.c
-rw-r--r--. 1 oracle docker 2233 12月 4 2013 true.c
-rw-r--r--. 1 oracle docker 12173 12月 4 2013 truncate.c
-rw-r--r--. 1 oracle docker 14063 12月 4 2013 tsort.c
-rw-r--r--. 1 oracle docker 3054 12月 4 2013 tty.c
-rw-r--r--. 1 oracle docker 48 12月 4 2013 uname-arch.c
-rw-r--r--. 1 oracle docker 49 12月 4 2013 uname-uname.c
-rw-r--r--. 1 oracle docker 9910 12月 4 2013 uname.c
-rw-r--r--. 1 oracle docker 146 12月 4 2013 uname.h
-rw-r--r--. 1 oracle docker 15221 12月 4 2013 unexpand.c
-rw-r--r--. 1 oracle docker 18932 12月 4 2013 uniq.c
-rw-r--r--. 1 oracle docker 2392 12月 4 2013 unlink.c
-rw-r--r--. 1 oracle docker 6767 12月 4 2013 uptime.c
-rw-r--r--. 1 oracle docker 3610 12月 4 2013 users.c
-rw-r--r--. 1 oracle docker 23793 12月 4 2013 wc.c
-rw-r--r--. 1 oracle docker 22102 12月 4 2013 who.c
-rw-r--r--. 1 oracle docker 2482 12月 4 2013 whoami.c
-rw-r--r--. 1 oracle docker 2312 12月 4 2013 yes.c