Moved "/*" to another destination - what to do?

Hi All,
please i wouldnt know if there is a way out of the stupid thing i did. i was trying to move all the files in the root directory to a temporary folder i created and mistakenly issue mv * /proo and the system moved all the folders into that directory and couldnt un-moved it back it ws coming up with command not found.
Please can any one help ?

You will most certainly need a maintenance boot, and possibly best if you put this into the "Emergency UNIX and Linux Support !! Help Me!!" forum?

Probably you won't be able to avoid a complete restore.

First thing: calm down. Nobody shaking for fear should be allowed anywhere near a system. Go out of the office for five minutes, smoke a cigarette, drink a coffee - anything, but DON'T TOUCH THE SYSTEM!

I wonder if your move even succeeded, because "/proo" is in the root-fs "/" and there is not that much space in it usually. Probably only a small part of vital files was really moved.

First, try if you still have the system binaries: try "mv". If it says something like "missing file operand" or a similar error this is fine - you still have it. If the answer is "not found" you're in deep manure.

In this case, change into "/proo" first and issue an "echo *" - this is the shell replacement for "ls", because if "mv" is missing then "ls" is probably missing too. Search for the binaries (probably "/proo/usr/bin"), then set the PATH temporarily to this directory where you found "mv":

PATH=/proo/usr/bin:$PATH ; export PATH

this should give you at least access to "mv".

  • Check if in "/proo" are only the parts you moved there accidentally. Use "ls" if you have it, otherwise use "echo *" like above and compare the output with the output of a working system. It has not to be 100% congruent, but most of it should match.

  • If this is the case try to move back everything you have moved away:

mv /proo/* /

I hope this helps.

bakunin

1 Like