If you accidentally delete a crucial library folder, such as /usr/lib, how can you recover from that?
If you delete
/usr/lib, you will kill your system as very crucial libraries reside in this directory. Like the LibC library which is used by all binaries. So it is unlikely that you will be able to something.
(If you are lucky and interrupted the command with a quick CTRL+C before is comletion, maybe only sub-dirs are deleted and the LibC is still there)
If the system is totally blocked (login impossible, boot fails, ...), let's hope that you have a Live CD of the same distribution and the same version under the hand.
Boot from this CD, mount the filesystem of your hard-disk and copy the
/usr/lib from the Live system to the one on the hard-disk.
In some cases, you can try to update or reinstall the package. For example, if you delete or degrade libpthread.so file inside /usr/lib, you can reinstall upper level and container package like glibc to recover the file. This procedure will be done by dependency library and file check during reinstall or updating.
For example, try:
# to recover and take libpthread.so back. sudo yum install glibc