linux rpm2cpio 解压下载好的rpm包

举报
千江有水千江月 发表于 2021/10/04 19:49:01 2021/10/04
【摘要】 ECS信息规格:2vCPUs | 4GiB | kc1.large.2镜像:openEuler 20.03 64bit with ARM | 公共镜像  linux rpm2cpio 解压下载好的rpm包 查询tcpdump软件包# yum search tcpdumpLast metadata expiration check: 0:10:57 ago on Mon 04 Oct 202...

ECS信息

  • 规格:2vCPUs | 4GiB | kc1.large.2
  • 镜像:openEuler 20.03 64bit with ARM | 公共镜像

linux rpm2cpio 解压下载好的rpm包

查询tcpdump软件包

# yum search tcpdump
Last metadata expiration check: 0:10:57 ago on Mon 04 Oct 2021 07:23:18 PM CST.
=============================================================== Name Exactly Matched: tcpdump ===============================================================
tcpdump.aarch64 : A network traffic monitoring tool
tcpdump.src : A network traffic monitoring tool
============================================================== Name & Summary Matched: tcpdump ==============================================================
tcpdump-help.aarch64 : Help documents for tcpdump
tcpdump-debugsource.aarch64 : Debug sources for package tcpdump
tcpdump-debuginfo.aarch64 : Debug information for package tcpdump
# rpm -qa | grep tcpdump
tcpdump-4.9.3-3.oe1.aarch64

# yum install tcpdump-4.9.3-3.oe1.aarch64
Last metadata expiration check: 0:11:34 ago on Mon 04 Oct 2021 07:23:18 PM CST.
Package tcpdump-14:4.9.3-3.oe1.aarch64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

wget 下载软件包

# wget https://repo.openeuler.org/openEuler-20.03-LTS/everything/aarch64/Packages/tcpdump-4.9.3-3.oe1.aarch64.rpm
--2021-10-04 19:36:01--  https://repo.openeuler.org/openEuler-20.03-LTS/everything/aarch64/Packages/tcpdump-4.9.3-3.oe1.aarch64.rpm
Resolving repo.openeuler.org (repo.openeuler.org)... 159.138.11.195
Connecting to repo.openeuler.org (repo.openeuler.org)|159.138.11.195|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 395800 (387K) [application/x-redhat-package-manager]
Saving to: ‘tcpdump-4.9.3-3.oe1.aarch64.rpm’

tcpdump-4.9.3-3.oe1.aarch64.rpm         100%[============================================================================>] 386.52K   863KB/s    in 0.4s    

2021-10-04 19:36:02 (863 KB/s) - ‘tcpdump-4.9.3-3.oe1.aarch64.rpm’ saved [395800/395800]


解压

# ll
total 392K
-rw------- 1 root root  107 Oct  3 19:42 if_example.sh
-rw------- 1 root root 387K Mar 26  2020 tcpdump-4.9.3-3.oe1.aarch64.rpm
# rpm2cpio tcpdump-4.9.3-3.oe1.aarch64.rpm | cpio -idmv
./usr/sbin/tcpdump
./usr/sbin/tcpslice
./usr/share/doc/tcpdump
./usr/share/doc/tcpdump/CHANGES
./usr/share/doc/tcpdump/CREDITS
./usr/share/doc/tcpdump/README.md
./usr/share/licenses/tcpdump
./usr/share/licenses/tcpdump/LICENSE
2507 blocks
# ll
total 396K
-rw------- 1 root root  107 Oct  3 19:42 if_example.sh
-rw------- 1 root root 387K Mar 26  2020 tcpdump-4.9.3-3.oe1.aarch64.rpm
drwx------ 4 root root 4.0K Oct  4 19:36 usr
# tree ./usr
./usr
├── sbin
│   ├── tcpdump
│   └── tcpslice
└── share
    ├── doc
    │   └── tcpdump
    │       ├── CHANGES
    │       ├── CREDITS
    │       └── README.md
    └── licenses
        └── tcpdump
            └── LICENSE

6 directories, 6 files

学习资料

欢迎各位同学一起来交流学习心得^_^

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。