rpm -qf 的使用技巧,以及如何查找软件包
来源:互联网 发布:山东 知满天面试怎么样 编辑:程序博客网 时间:2024/05/06 02:50
首先查看安装的软件包,或者时候安装有某某软件包的命令
rpm (-qa)| grep 软件名
root@mode oldboy]# rpm -qa| grep opensslopenssl-devel-0.9.8e-22.el5openssl-0.9.8e-22.el5openssl-0.9.8e-22.el5openssl-devel-0.9.8e-22.el5[root@mode oldboy]# yum search opensslLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfilefile:///mnt/cdrom/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/mnt/cdrom/repodata/repomd.xml'Trying other mirror.=============================== Matched: openssl ===============================m2crypto.x86_64 : Support for using OpenSSL in python scriptsopenssl.i686 : The OpenSSL toolkitopenssl.x86_64 : The OpenSSL toolkitopenssl-devel.i386 : Files for development of applications which will use : OpenSSLopenssl-devel.x86_64 : Files for development of applications which will use : OpenSSLopenssl-perl.x86_64 : Perl scripts provided with OpenSSLopenssl097a.i386 : The OpenSSL toolkitopenssl097a.x86_64 : The OpenSSL toolkitperl-Crypt-SSLeay.x86_64 : Crypt::SSLeay - OpenSSL glue that provides LWP https : supportperl-Net-SSLeay.x86_64 : Perl extension for using OpenSSLpyOpenSSL.x86_64 : Python wrapper module around the OpenSSL libraryxmlsec1.i386 : Library providing support for "XML Signature" and "XML : Encryption" standardsxmlsec1.x86_64 : Library providing support for "XML Signature" and "XML : Encryption" standardsxmlsec1-openssl.i386 : OpenSSL crypto plugin for XML Security Libraryxmlsec1-openssl.x86_64 : OpenSSL crypto plugin for XML Security Libraryxmlsec1-openssl-devel.i386 : OpenSSL crypto plugin for XML Security Libraryxmlsec1-openssl-devel.x86_64 : OpenSSL crypto plugin for XML Security Librar
如果在生产环境中,系统的重要文件/etc/inittab被删除了(系统还没重启,崩溃前),不要急,下面告诉你该如何处理。1、模拟误删除文件[root@localhost ~]# rm -rf /etc/inittab[root@localhost ~]# cat /etc/inittabcat: /etc/inittab: No such file or directory2、新建该文件,并查看对应包的相关信息[root@localhost ~]# touch /etc/inittab[root@localhost ~]# rpm -qf /etc/inittabinitscripts-8.45.19.EL-1 3、确定了包的相关信息,挂载安装光盘,进行查找[root@localhost ~]# cd /mnt/yum/[root@localhost yum]# lltotal 0[root@localhost yum]# cd ~[root@localhost ~]# mount /dev/cdrom /mnt/yummount: block device /dev/cdrom is write-protected, mounting read-only[root@localhost ~]# cd /mnt/yum/Server/[root@localhost Server]# cp initscripts-8.45.30-2.el5.i386.rpm /tmpcp: overwrite `/tmp/initscripts-8.45.30-2.el5.i386.rpm'? y[root@localhost Server]# cd /tmp[root@localhost tmp]# lltotal 1680drwx------ 2 root root 4096 Feb 17 13:45 bindrwx------ 9 root root 4096 Feb 17 13:45 etcdrwx------ 3 root root 4096 Feb 17 13:53 gconfd-root-r--r--r-- 1 root root 1651907 Feb 17 15:41 initscripts-8.45.30-2.el5.i386.rpmdrwx------ 2 root root 4096 Feb 17 13:53 keyring-06YG9Fdrwx------ 2 root root 4096 Sep 26 08:44 keyring-elqVM1drwx------ 2 root root 4096 Sep 26 08:08 keyring-jTNbTbdrwx------ 3 root root 4096 Feb 17 13:45 libsrwxr-xr-x 1 root root 0 Feb 17 13:54 mapping-rootdrwx------ 2 root root 4096 Feb 17 15:38 orbit-rootdrwx------ 2 root root 4096 Feb 17 13:45 sbindrwx------ 2 root root 4096 Feb 17 13:53 ssh-ROxTuK6949drwx------ 4 root root 4096 Feb 17 13:45 usrdrwx------ 4 root root 4096 Feb 17 13:45 vardrwx------ 2 root root 4096 Feb 17 13:54 virtual-root.2eelUVdrwxrwxrwt 2 root root 4096 Feb 5 12:19 VMwareDnDdrwx------ 2 root root 4096 Feb 17 13:53 vmware-root 4、解压包的信息[root@localhost tmp]# rpm2cpio initscripts-8.45.30-2.el5.i386.rpm |cpio -imd10748 blocks[root@localhost tmp]# lltotal 1680drwx------ 2 root root 4096 Feb 17 13:45 bindrwx------ 9 root root 4096 Feb 17 13:45 etcdrwx------ 3 root root 4096 Feb 17 13:53 gconfd-root-r--r--r-- 1 root root 1651907 Feb 17 15:41 initscripts-8.45.30-2.el5.i386.rpmdrwx------ 2 root root 4096 Feb 17 13:53 keyring-06YG9Fdrwx------ 2 root root 4096 Sep 26 08:44 keyring-elqVM1drwx------ 2 root root 4096 Sep 26 08:08 keyring-jTNbTbdrwx------ 3 root root 4096 Feb 17 13:45 libsrwxr-xr-x 1 root root 0 Feb 17 13:54 mapping-rootdrwx------ 2 root root 4096 Feb 17 15:38 orbit-rootdrwx------ 2 root root 4096 Feb 17 13:45 sbindrwx------ 2 root root 4096 Feb 17 13:53 ssh-ROxTuK6949drwx------ 4 root root 4096 Feb 17 13:45 usrdrwx------ 4 root root 4096 Feb 17 13:45 vardrwx------ 2 root root 4096 Feb 17 13:54 virtual-root.2eelUVdrwxrwxrwt 2 root root 4096 Feb 5 12:19 VMwareDnDdrwx------ 2 root root 4096 Feb 17 13:53 vmware-root5、进行文件替换与简单修改[root@localhost tmp]# cp ./etc/inittab /etc/cp: overwrite `/etc/inittab'? y[root@localhost tmp]# cat /etc/inittab收工!!!!!!!
yum search 软件名
rpm -qf 软件名
0 0
- rpm -qf 的使用技巧,以及如何查找软件包
- CentOS 6.2 使用第三方yum源安装更多rpm软件包以及centos系统的若干问题
- RPM软件包使用常见问题
- RPM 软件包使用常见问题
- RPM软件包使用常见问题
- rpm RPM软件包的管理。
- RPM软件包的制作
- Redhat RPM软件包使用常见问题
- 【FAQ】RPM软件包使用常见问题
- 使用rpm命令安装软件包
- linux 中删除使用rpm安装的软件包的方法
- rpm软件包
- rpm软件包
- rpm 和 yum 的使用技巧
- RPM软件包使用常见问题 ----------- { rpm 使用 答疑 FAQ (Linux) }
- RPM软件包使用常见问题-转
- linux使用RPM来管理软件包
- 使用FPM 制作 rpm、deb软件包
- iOS应用性能调优的25个建议和技巧
- 关于C++默认形参定义的小问题
- PAT 1076. Forwards on Weibo (30)
- Hadoop 2.X 完全分布式部署安装
- 组合数C(n,m)
- rpm -qf 的使用技巧,以及如何查找软件包
- 第一个springMvc
- QtAndroid详解(3):startActivity实战Android拍照功能
- 限定条件不止一种的背包问题
- 划分树
- 用牛顿迭代法求某正数n的平方根
- C/C++数组名与指针区别深入探索
- qsort_总结
- 深度学习之autoencoder .