Testimonials: Ever a knave, accidentally put/usr/bin under all the commands are deleted, fortunately this only a test environment, when in operation, a bit deft on hand make mistakes ...
Recovery process: (Below is a VM managed under vsphere)
1. Turn off the virtual machine--On the BIOS Setup CD Boot--load CentOS7 iso--Boot
2. Select Troubleshooting
3. Process Rescue Mode
4. Select Continue in rescue mode
5. Unable to switch root to see if the bin file exists, copy the corresponding command to the past
6. Restart: Init 6
The following is an example of finding a workaround and finding a recovery deleted log
[[email protected] ~]# yum install httpd-y[[email protected] ~]# systemctl start httpd
Delete error log
[[email protected] ~]# rm-rf/var/log/httpd/error_log[[email protected] ~]# ll/var/log/httpd/total 0-rw-r--r--1 root ro OT 0 June 13:49 Access_log
Recovery principle: Find the httpd corresponding to the process number, and the/proc under the file copy back to restore principle: find httpd corresponding process number, and put the file under the/proc copy back
Restore operation after mis-deletion of Linux files