rpm包文件取出方法rpm2cpio|cpio -idv

rpm包内的文件想要查看是哪些文件分别处于安装后的什么路径,可以用rpm2cpio先将rpm包转换为cpio压缩包;

然后再使用cpio命令将压缩包的内容还原出来;操作如下:

[email protected]:~/rpm$ ls
rsyslog-5.8.10-10.el6_6.i686.rpm
[email protected]:~/rpm$ mkdir test; cd test; rpm2cpio ../rsyslog-5.8.10-10.el6_6.i686.rpm | cpio -idv
./etc/logrotate.d/syslog
./etc/pki/rsyslog
./etc/rc.d/init.d/rsyslog
./etc/rsyslog.conf
./etc/rsyslog.d
./etc/sysconfig/rsyslog
./lib/rsyslog
./lib/rsyslog/imfile.so
./lib/rsyslog/imklog.so
./lib/rsyslog/immark.so
./lib/rsyslog/impstats.so
./lib/rsyslog/imptcp.so
./lib/rsyslog/imtcp.so
./lib/rsyslog/imudp.so
./lib/rsyslog/imuxsock.so
./lib/rsyslog/lmnet.so
./lib/rsyslog/lmnetstrms.so
./lib/rsyslog/lmnsd_ptcp.so
./lib/rsyslog/lmregexp.so
./lib/rsyslog/lmstrmsrv.so
./lib/rsyslog/lmtcpclt.so
./lib/rsyslog/lmtcpsrv.so
./lib/rsyslog/lmzlibw.so
./lib/rsyslog/ommail.so
./lib/rsyslog/omprog.so
./lib/rsyslog/omruleset.so
./lib/rsyslog/omtesting.so
./lib/rsyslog/omuxsock.so
./lib/rsyslog/pmlastmsg.so
./sbin/rsyslogd
./usr/share/doc/rsyslog-5.8.10
./usr/share/doc/rsyslog-5.8.10/AUTHORS
./usr/share/doc/rsyslog-5.8.10/COPYING
./usr/share/doc/rsyslog-5.8.10/COPYING.ASL20
./usr/share/doc/rsyslog-5.8.10/COPYING.LESSER
./usr/share/doc/rsyslog-5.8.10/ChangeLog
./usr/share/doc/rsyslog-5.8.10/NEWS
./usr/share/doc/rsyslog-5.8.10/README
./usr/share/doc/rsyslog-5.8.10/bugs.html
./usr/share/doc/rsyslog-5.8.10/build_from_repo.html
./usr/share/doc/rsyslog-5.8.10/contributors.html
./usr/share/doc/rsyslog-5.8.10/debug.html
./usr/share/doc/rsyslog-5.8.10/dev_queue.html
./usr/share/doc/rsyslog-5.8.10/droppriv.html
./usr/share/doc/rsyslog-5.8.10/expression.html
./usr/share/doc/rsyslog-5.8.10/features.html
./usr/share/doc/rsyslog-5.8.10/generic_design.html
./usr/share/doc/rsyslog-5.8.10/gssapi.html
./usr/share/doc/rsyslog-5.8.10/history.html
./usr/share/doc/rsyslog-5.8.10/how2help.html
./usr/share/doc/rsyslog-5.8.10/im3195.html
./usr/share/doc/rsyslog-5.8.10/imfile.html
./usr/share/doc/rsyslog-5.8.10/imgssapi.html
./usr/share/doc/rsyslog-5.8.10/imklog.html
./usr/share/doc/rsyslog-5.8.10/impstats.html
./usr/share/doc/rsyslog-5.8.10/imptcp.html
./usr/share/doc/rsyslog-5.8.10/imrelp.html
./usr/share/doc/rsyslog-5.8.10/imsolaris.html
./usr/share/doc/rsyslog-5.8.10/imtcp.html
./usr/share/doc/rsyslog-5.8.10/imuxsock.html
./usr/share/doc/rsyslog-5.8.10/index.html
./usr/share/doc/rsyslog-5.8.10/install.html
./usr/share/doc/rsyslog-5.8.10/ipv6.html
./usr/share/doc/rsyslog-5.8.10/licensing.html
./usr/share/doc/rsyslog-5.8.10/log_rotation_fix_size.html
./usr/share/doc/rsyslog-5.8.10/manual.html
./usr/share/doc/rsyslog-5.8.10/mmsnmptrapd.html
./usr/share/doc/rsyslog-5.8.10/modules.html
./usr/share/doc/rsyslog-5.8.10/multi_ruleset.html
./usr/share/doc/rsyslog-5.8.10/netstream.html
./usr/share/doc/rsyslog-5.8.10/ns_gtls.html
./usr/share/doc/rsyslog-5.8.10/ns_ptcp.html
./usr/share/doc/rsyslog-5.8.10/omlibdbi.html
./usr/share/doc/rsyslog-5.8.10/ommail.html
./usr/share/doc/rsyslog-5.8.10/ommysql.html
./usr/share/doc/rsyslog-5.8.10/omoracle.html
./usr/share/doc/rsyslog-5.8.10/omrelp.html
./usr/share/doc/rsyslog-5.8.10/omruleset.html
./usr/share/doc/rsyslog-5.8.10/omsnmp.html
./usr/share/doc/rsyslog-5.8.10/omstdout.html
./usr/share/doc/rsyslog-5.8.10/omudpspoof.html
./usr/share/doc/rsyslog-5.8.10/omuxsock.html
./usr/share/doc/rsyslog-5.8.10/pmlastmsg.html
./usr/share/doc/rsyslog-5.8.10/property_replacer.html
./usr/share/doc/rsyslog-5.8.10/queues.html
./usr/share/doc/rsyslog-5.8.10/queues_analogy.html
./usr/share/doc/rsyslog-5.8.10/rainerscript.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_actionexeconlywhenpreviousissuspended.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_actionresumeinterval.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_allowedsender.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_controlcharacterescapeprefix.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_debugprintcfsyslinehandlerlist.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_debugprintmodulelist.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_debugprinttemplatelist.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_dircreatemode.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_dirgroup.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_dirowner.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_dropmsgswithmaliciousdnsptrrecords.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_droptrailinglfonreception.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_dynafilecachesize.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_escape8bitcharsonreceive.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_escapecontrolcharactersonreceive.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_failonchownfailure.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_filecreatemode.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_filegroup.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_fileowner.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_generateconfiggraph.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_gssforwardservicename.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_gsslistenservicename.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_gssmode.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_includeconfig.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_mainmsgqueuesize.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_markmessageperiod.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_moddir.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_modload.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_repeatedmsgreduction.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_resetconfigvariables.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_rulesetcreatemainqueue.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_rulesetparser.html
./usr/share/doc/rsyslog-5.8.10/rsconf1_umask.html
./usr/share/doc/rsyslog-5.8.10/rscript_abnf.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_conf.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_conf_actions.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_conf_examples.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_conf_filter.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_conf_global.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_conf_modules.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_conf_nomatch.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_conf_output.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_conf_templates.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_high_database_rate.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_mysql.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_ng_comparison.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_packages.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_pgsql.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_php_syslog_ng.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_recording_pri.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_reliable_forwarding.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_secure_tls.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_stunnel.html
./usr/share/doc/rsyslog-5.8.10/rsyslog_tls.html
./usr/share/doc/rsyslog-5.8.10/syslog_parsing.html
./usr/share/doc/rsyslog-5.8.10/syslog_protocol.html
./usr/share/doc/rsyslog-5.8.10/tls_cert_ca.html
./usr/share/doc/rsyslog-5.8.10/tls_cert_client.html
./usr/share/doc/rsyslog-5.8.10/tls_cert_errmsgs.html
./usr/share/doc/rsyslog-5.8.10/tls_cert_machine.html
./usr/share/doc/rsyslog-5.8.10/tls_cert_scenario.html
./usr/share/doc/rsyslog-5.8.10/tls_cert_server.html
./usr/share/doc/rsyslog-5.8.10/tls_cert_summary.html
./usr/share/doc/rsyslog-5.8.10/tls_cert_udp_relay.html
./usr/share/doc/rsyslog-5.8.10/troubleshoot.html
./usr/share/doc/rsyslog-5.8.10/v3compatibility.html
./usr/share/doc/rsyslog-5.8.10/v4compatibility.html
./usr/share/doc/rsyslog-5.8.10/v5compatibility.html
./usr/share/doc/rsyslog-5.8.10/version_naming.html
./usr/share/man/man5/rsyslog.conf.5.gz
./usr/share/man/man8/rsyslogd.8.gz
./var/lib/rsyslog
4285 blocks
[email protected]:~/rpm/test$ ls
etc lib sbin usr var
[email protected]:~/rpm/test$

时间: 2024-10-05 05:07:17

rpm包文件取出方法rpm2cpio|cpio -idv的相关文章

不安装rpm包,取出rpm包里的文件

1.查看rpm包里的文件 [[email protected]_166_132 ~]# rpm -qlp mysql5.6.29-1-3.x86_64.rpm |more/etc/ld.so.conf.d/mysql-5.6.23_compiled_x86_64.conf/usr/local/lib/libjemalloc.a/usr/local/lib/libjemalloc.so/usr/local/lib/libjemalloc.so.1/usr/local/lib/libjemalloc

RPM包文件校验和文件提取

RPM包文件校验和文件提取,布布扣,bubuko.com

Linux提取RPM包文件(cpio命令)详解

在讲解如何从 RPM 包中提取文件之前,先来系统学习一下 cpio 命令. cpio 命令用于从归档包中存入和读取文件,换句话说,cpio 命令可以从归档包中提取文件(或目录),也可以将文件(或目录)复制到归档包中. 归档包,也可称为文件库,其实就是 cpio 或 tar 格式的文件,该文件中包含其他文件以及一些相关信息(文件名.访问权限等).归档包既可以是磁盘中的文件,也可以是磁带或管道. cpio 命令可以看做是备份或还原命令,因为它可以将数据(文件)备份到 cpio 归档库,也可以利用 c

第8天压缩 xarges sed命令 yum配置 rpm包文件修复

seq 10 seq 10 |xargs echo 1 2 3 4 5 默认跟 echo \n换成空格 [[email protected] ~]#seq 1 10 |xargs echo [[email protected] ~]#seq 1 10 |xargs 1 2 3 4 5 6 7 8 9 10 [[email protected] ~]#seq 1 10 |xargs echo 1 2 3 4 5 6 7 8 9 10 [[email protected] ~]# xargs 默认是

MySQL在linux上的rpm包方式安装方法

1.下载上传mysql server和client rpm包: [[email protected] mnt]# ls MySQL-client-5.5.53-1.el6.x86_64.rpm MySQL-server-5.5.53-1.el6.x86_64.rpm 2.安装mysql数据库: 1)安装mysql server端rpm包: [[email protected] mnt]# rpm -ivh MySQL-server-5.5.53-1.el6.x86_64.rpm warning:

rpm包的安装方法

每次都记不住,这次必须整理一下!cd到你存放rpm文件包的目录rpm -ivh linuxqq-v1.0.2-beta1.i386.rpm安装时可能会遇到缺少包的错误.rpm -ivh --replacepkgs webmin-1.290-1.noarch.rpm 软件包重复安装将会失败,若仍需要安装必须加--replacepkgs rpm -ivh --replacefiles webmin-1.290-1.noarch.rpm 软件包的某个文件已在安装其他软件包时安装过,则安装将会失败,若仍

7.1 安装软件包的三种方法7.2 rpm包介绍 7.3 rpm工具用法 7.4 yum工具用法7.5 yum搭建本地仓库

- 7.1 安装软件包的三种方法 - 7.2 rpm包介绍 - 7.3 rpm工具用法 - 7.4 yum工具用法 - 7.5 yum搭建本地仓库 - 扩展 1. yum保留已经安装过的包 http://www.360doc.com/content/11/0218/15/4171006_94080041.shtml 2. 搭建局域网yum源 http://ask.apelearn.com/question/7627 # 7.1 安装软件包的三种方法 - windows的.exe文件实际上是一种二

软件包安装方法、rpm包介绍、rpm、yum、

安装软件包的三种方法 window的exe文件就是二进制包,不能使用记事本文本打开. Linux下的ls命令文件也是二进制的. rpm工具.类似Windows的exe 源码包 就是源代码.需要编译器编译可执行文件 Yum工具 操作的是rpm包.Yum工具是Python开发.自动安装依赖的包.Yum就像手机应用宝找到什么下载安装 rpm包介绍 设置光驱并挂载 虚拟机光盘.右键连接 [[email protected] ~]# mount /dev/cdrom /mnt/ [[email prote

安装软件包的三种方法、rpm包介绍及工具用法、yum用法及搭建本地仓库

一.安装软件包的三种方法 rpm工具 rpm(Redhat Package Manager)RPM软件包管理器,是以一种数据库记录的方式来将我们所需要的套件安装到Linux主机的一套管理程序.rpm包是预先在Linux机器上编译好并打包好的文件,安装起来非常快捷.但是有一个缺点:安装环境必须与编译时的一致或相当:包与包之间存在着相互依赖的情况,安装或卸载包时需要先把依赖的包安装或卸载,如果依赖的包是系统所必须的,那就不能卸载这个包. yum工具 (类似于苹果手机里面的app store) yum