Linux – Every command returns “No such file or directory” or “/bin/sh: bad interpreter: No such file or directory”

linux

So I've made a huge mistake and moved /lib and /opt folders to subfolder. Now almost every command returns "No such file or directory" or "/bin/sh: bad interpreter: No such file or directory". I need to move these files back, but I can't run mv. Can I do it somehow or should I start restoring server from backups?

EDIT:

My provider allowed external access to file system, so I was able to move directories to main directory and everything went back to normal:) Thanks for help.

Best Answer

Step 1: Boot from live-cd...

Step 2: Mount the Hard Disk

Step 3: and move the files back.

Step 4: NEVER do that again.

(if you need specific instructions... just ask)