加入收藏 | 设为首页 | 会员中心 | 我要投稿 PHP编程网 - 黄冈站长网 (http://www.0713zz.com/)- 数据应用、建站、人体识别、智能机器人、语音技术!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

rpmverify命令用来验证已安装的rpm软件包的正确性

发布时间:2023-07-14 11:02:28 所属栏目:Linux 来源:网络
导读:   Linux常用命令rpmverify命令用来验证已安装的rpm软件包的正确性,下面为大家分享一下Linux常用命令rpmverify命令具体使用方法。



  语法格式



  rpmverify [参数]

  Linux常用命令rpmverify命令用来验证已安装的rpm软件包的正确性,下面为大家分享一下Linux常用命令rpmverify命令具体使用方法。
 
  语法格式
 
  rpmverify [参数]
 
  常用参数:
 
  -Va 验证所有软件包
 
  -Vf 验证指定软件包
 
  –nomd5 不验证软件包的md5摘要
 
  参考实例
 
  验证所有软件包:
 
   [root@linux265 ~]# rpmverify -Va
 
  改变软件包权限:
 
   [root@linux265 ~]# rpmverify -Vf /bin/touch  
 
   [root@linux265 ~]# rpm -qf /bin/touch coreutils-8.4-43.el6.x86_64   [root@linux265 ~]# vim /bin/touch  
 
   [root@linux265 ~]# ll -h /bin/touch  -rwxr-xr-x. 1 root root 47K May 11  2016 /bin/touch  
 
   [root@linux265 ~]# chmod 777 /bin/touch  
 
   [root@linux265 ~]# ll -h /bin/touch  -rwxrwxrwx. 1 root root 47K May 11  2016 /bin/touch
 
   [root@linux265 ~]# rpmverify -Vf /bin/touch .M.......    /bin/touch
 
  如果恢复权限后:
 
   [root@linux265 ~]# chmod 755 /bin/touch  
 
   [root@linux265 ~]# ll -h /bin/touch -rwxr-xr-x. 1 root root 47K May 11  2016 /bin/touch    
 
   [root@linux265 ~]# rpmverify -Vf /bin/touch
 
  如果编辑一个文件,并增加内容,如果修改过来,修改时间就会变化:
 
   [root@linux265 ~]# rpmverify -Vf /etc/ssh/sshd_config #增加内容 S.5....T.  c /etc/ssh/sshd_config  
 
   [root@linux265 ~]# vim /etc/ssh/sshd_config  #去掉增加内容
 
   [root@linux265 ~]# rpmverify -Vf /etc/ssh/sshd_config   .......T.  c /etc/ssh/sshd_config
 
  不验证软件包的md5摘要:
 
   [root@linux265 ~]# rpmverify --nomd5 -Vf /bin/touch
 

(编辑:PHP编程网 - 黄冈站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章