Linux的rpmverify命令如何使用


今天主机评测网小编给大家分享一下Linux的rpmverify命令如何使用的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。

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

语法格式

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  2022 /bin/touch   [root@linux265 ~]# chmod 777 /bin/touch   [root@linux265 ~]# ll -h /bin/touch  -rwxrwxrwx. 1 root root 47K May 11  2022 /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  2022 /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

以上就是“Linux的rpmverify命令如何使用”这篇文章的所有内容,感谢各位的阅读!相信大家阅读完这篇文章都有很大的收获,小编每天都会为大家更新不同的知识,如果还想学习更多的知识,请关注主机评测网行业资讯频道。


上一篇:C++中的指针怎么定义和使用

下一篇:Linux进程及作业管理的方法是什么


Copyright © 2002-2019 测速网 https://www.inhv.cn/ 皖ICP备2023010105号 城市 地区 街道
温馨提示:部分文章图片数据来源与网络,仅供参考!版权归原作者所有,如有侵权请联系删除!
热门搜索