LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-31-2011, 03:02 PM   #1
SupermanInNY
Member
 
Registered: Jan 2006
Distribution: CentOS
Posts: 30

Rep: Reputation: 15
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.
 
Old 05-31-2011, 03:15 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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.
 
Old 05-31-2011, 03:20 PM   #3
SupermanInNY
Member
 
Registered: Jan 2006
Distribution: CentOS
Posts: 30

Original Poster
Rep: Reputation: 15
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?
 
Old 05-31-2011, 03:32 PM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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).
 
Old 06-01-2011, 08:17 AM   #5
SupermanInNY
Member
 
Registered: Jan 2006
Distribution: CentOS
Posts: 30

Original Poster
Rep: Reputation: 15
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).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM
[SOLVED] mv /* ./ - bin and other folders moved to home directory Seregwethrin Linux - Server 4 06-30-2009 04:50 PM
/bin/bash: permission denied(after / partition moved) xbuffalo Linux - General 7 06-19-2008 01:18 AM
AaaaAAAaah help, I made a huge mistake :( accidentally moved /bin! yelgnits Linux - General 10 09-02-2004 07:08 AM
Bin Moved David@330 Linux - Newbie 3 08-17-2004 12:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration