Delete all files under /usr/bin by mistake

What should I do if I delete all the files under /usr/bin by mistake?
The files here are the execution files of some programs. Without it, many commands are useless, such as last, ssh, etc.
Solution:
use a U disk to /usr/bin of the same system, and put all the files in this directory. The things that are tested to the U disk, of course, the file system of the U disk may be fat or ntfs. Some linked files cannot be copied, skip it, and test out the ones that can be copied.
Then insert the u disk into the server, then you will find that the u disk is not seen under /media.
It doesn't matter, fdisk -l will be able to see the USB
flash drive. Mount the USB flash drive to a directory and mount /dev/sdb4 /test (your USB flash drive may not be /dev/sdb4),
and then change the file under /test from /usr/ The copied stuff from bin is moved to the /usr/bin directory.

Then, you will find that many commands can be used. Use these available commands to remotely go to the normal Linux system of the same version, and copy all the things under /usr/bin to the /usr/bin of the system that was deleted by mistake

------- Do this It can only guarantee that most of the commands are useful, and some links may be useless.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326990217&siteId=291194637