9

Possible Duplicate:
Moved bin and other folders! How to get them back?

I entered the following command, which I know is not correct and I think I've moved everything to "../", can I do anything to recover from this:

mv /* ../
Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232

2 Answers2

4

Yes, you screwed up. :) Everyone does it at some point. As you said, you've moved everything to ../ (if you were root).

Without knowing what directory you were in at the time, you might have a chance of getting things back to some reasonable state by typing ../bin/mv ../* / from the same directory.

Otherwise, you can boot from a recovery CD so you can back up your data, and then reinstall Linux.

While booting from the recovery CD, you could also try moving the root files and directories back to /. That way you might be able to avoid reinstalling.

Good luck!

mrb
  • 10,288
0

If you had busybox already installed, you may have some success with:

../bin/busybox mv ../* /

after that, you can then manually clean up the stuff that should have been in ../ (wherever that is) back from / to wherever it belongs.

busybox has a chance of working where mv doesn't because busybox is linked statically and does not need to dynamically link any libraries.

If busybox wasn't already installed, you could try to boot a rescue CD, mount your hard disk partitions under /mnt, and mv stuff to where it belongs.

cas
  • 78,579