We accidentally overwrote file /sbin/sysctl with command echo 1 > /sbin/sysctl
How do we restore the file in centos?
We accidentally overwrote file /sbin/sysctl with command echo 1 > /sbin/sysctl
How do we restore the file in centos?
To expand on HBruijn's comment, here's a sequence of commands that should get that file (and anything else from the same package) back.
Note that you need to use yum reinstall
as yum install
will just tell you that the package is already up-to-date.
[root@centos7-01 msmtp]# rpm -q -f /sbin/sysctl
procps-ng-3.3.10-10.el7.x86_64
[root@centos7-01 msmtp]# yum reinstall procps-ng
...
Installed:
procps-ng.x86_64 0:3.3.10-10.el7
Complete!