Jump to content

Accidentally-moved-entire-linux-root-file-system-to-another-directory

From TetraWiki
Revision as of 11:55, 26 November 2012 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Accidentally moved entire linux root file system(/) to another directory[edit]

If / has been moved to any folder by mistake , System can recovered by following method ( Done on Centos 5)

Referance URL : http://www.linuxquestions.org/questions/linux-newbie-8/accidentally-moved-entire-linux-root-file-system-to-another-directory-832580/

1. Please do not loose the connected ssh session . keep it alive by any means

2. Command is ( make it suite your environment ) ( In this case , By mistake the / was moved in /home/support-tetra/support.tetrain.com/ )

/home/support-tetra/support.tetrain.com/lib/ld-linux.so.2 --library-path /home/support-tetra/support.tetrain.com/lib /home/support-
tetra/support.tetrain.com/bin/mv /home/support-tetra/support.tetrain.com/bin /home/support-tetra/support.tetrain.com/lib /


3. Then you can mv back the directories one-by-one by mv command.