LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Help,. moved /bin to somewhere.. need help retrieving it (https://www.linuxquestions.org/questions/linux-server-73/help-moved-bin-to-somewhere-need-help-retrieving-it-883792/)

SupermanInNY 05-31-2011 03:02 PM

Help,. moved /bin to somewhere.. need help retrieving it
 
I've issued the following command:

/usr/share/tomcat5.5/webapps/ROOT$ sudo mv ../../ptup_won /* ./

(yes,. I know it is Ubuntu command,. and yes it is ubuntu).

I'm still stuck with mv command.
Notice that there is a space after the ptup_won,. so where would you say my files have gone??

I'm still logged in to the server, so I'm able to move things back.. if only I knew where they moved.

-Sup.

colucix 05-31-2011 03:15 PM

Most likely they are under /usr/share/tomcat5.5/webapps/ROOT. The problem is that you have moved everything from / to /usr/share/tomcat5.5/webapps/ROOT except for the /usr directory, since you cannot move a directory to a subdirectory of itself.

Now you have to restore the correct situation without the mv command, since the bash executable is not in your PATH anymore. Your best bet at this point is to reboot the machine from a Live CD (like Knoppix) and restore the system from there.

SupermanInNY 05-31-2011 03:20 PM

Hi colucix,

Is there any way to do a list files (ls/dir/ or any other?) that would show me what files I have? Or is my only help with that is running a liveCD fix?

colucix 05-31-2011 03:32 PM

The problem is that ls is not in your PATH, but you can always try to give the full path to the command:
Code:

/usr/share/tomcat5.5/webapps/ROOT/bin/ls /usr/share/tomcat5.5/webapps/ROOT
however I'm afraid that the ls executable will not find the shared libraries it needs, since they were originally installed under /lib (now moved together with bin and the other dirs).

SupermanInNY 06-01-2011 08:17 AM

Issue resolved!

I connected a KVMoverIP to the server, placed Rescue disk and let the client search for his files.

He found the moved files in: /usr/share/tomcat5.5/webapps/ROOT/

(all the files and directories were moved to that path).

He moved them all back and we just rebooted successfuly.

Thanks all for suggestions/help.

-Sup.
(for those who think that I issued the command,. ==> it wasn't me,. it was the client, I'm just the go-to guy who is doing the leg work/searches on the forums).


All times are GMT -5. The time now is 03:13 AM.