ubuntu-apt 获取 coreutils 源代码

编辑 /etc/apt/sources.list

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic main
deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic main #取消注释

更新源 sudo apt update

获取源代码

root@aliyun:~# sudo apt source coreutils  #获取源代码
Reading package lists... Done
Need to get 5,294 kB of source archives.
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main coreutils 8.28-1ubuntu1 (dsc) [2,302 B]
Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main coreutils 8.28-1ubuntu1 (tar) [5,252 kB]
Get:3 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main coreutils 8.28-1ubuntu1 (asc) [1,196 B]
Get:4 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main coreutils 8.28-1ubuntu1 (diff) [37.9 kB]
Fetched 5,294 kB in 1s (7,179 kB/s)
dpkg-source: info: extracting coreutils in coreutils-8.28
dpkg-source: info: unpacking coreutils_8.28.orig.tar.xz
dpkg-source: info: unpacking coreutils_8.28-1ubuntu1.debian.tar.xz
dpkg-source: info: applying 61_whoips.patch
dpkg-source: info: applying 63_dd-appenderrors.patch
dpkg-source: info: applying 72_id_checkngroups.patch
dpkg-source: info: applying 80_fedora_sysinfo.patch
dpkg-source: info: applying 85_timer_settime.patch
dpkg-source: info: applying 99_kfbsd_fstat_patch.patch
dpkg-source: info: applying 99_float_endian_detection.patch
W: Download is performed unsandboxed as root as file 'coreutils_8.28-1ubuntu1.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

查看获取的源代码

root@aliyun:~# cd coreutils-8.28/
root@aliyun:coreutils-8.28# cd src/
root@aliyun:src# ls
base64.c          dircolors.hin       ioblksize.h        pinky.c           sum.c
basename.c        dirname.c           join.c             pr.c              sync.c
blake2            du.c                kill.c             primes.h          system.h
cat.c             echo.c              lbracket.c         printenv.c        tac.c
chcon.c           env.c               libstdbuf.c        printf.c          tac-pipe.c
chgrp.c           expand.c            link.c             prog-fprintf.c    tail.c
chmod.c           expand-common.c     ln.c               prog-fprintf.h    tee.c
chown.c           expand-common.h     local.mk           ptx.c             test.c
chown-core.c      expr.c              logname.c          pwd.c             timeout.c
chown-core.h      extent-scan.c       longlong.h         readlink.c        touch.c
chroot.c          extent-scan.h       ls.c               realpath.c        tr.c
cksum.c           extract-magic       ls-dir.c           relpath.c         true.c
comm.c            factor.c            ls.h               relpath.h         truncate.c
copy.c            false.c             ls-ls.c            remove.c          tsort.c
copy.h            fiemap.h            ls-vdir.c          remove.h          tty.c
coreutils-arch.c  find-mount-point.c  make-prime-list.c  rm.c              uname-arch.c
coreutils.c       find-mount-point.h  md5sum.c           rmdir.c           uname.c
coreutils-dir.c   fmt.c               mkdir.c            runcon.c          uname.h
coreutils-vdir.c  fold.c              mkfifo.c           selinux.c         uname-uname.c
cp.c              force-link.c        mknod.c            selinux.h         unexpand.c
cp-hash.c         force-link.h        mktemp.c           seq.c             uniq.c
cp-hash.h         fs.h                mv.c               set-fields.c      unlink.c
csplit.c          fs-is-local.h       nice.c             set-fields.h      uptime.c
cu-progs.mk       getlimits.c         nl.c               shred.c           users.c
cut.c             group-list.c        nohup.c            shuf.c            wc.c
date.c            group-list.h        nproc.c            single-binary.mk  whoami.c
dcgen             groups.c            numfmt.c           sleep.c           who.c
dd.c              head.c              od.c               sort.c            yes.c
df.c              hostid.c            operand2sig.c      split.c
die.h             hostname.c          operand2sig.h      stat.c
dircolors.c       id.c                paste.c            stdbuf.c
dircolors.h       install.c           pathchk.c          stty.c

references

  1. 实验楼-apt 获取 coreutils 代码
  2. sources.list
  3. 清华大学开源软件镜像站
  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值