Please help me on below question .

vijay ganji

New Member
Joined
May 29, 2021
Messages
2
Reaction score
2
Credits
20
Newbie to Linux and I did use below command which collapsed my Linux.

mv /* new

After running this command in terminal , I lost accessibility to Linux. I tried to re run below command.

mv /new/* /

But no luck. Damage happened as I spoiled the root folder.

May be some warning message in this pattern of command might have helped me realize mistake.
Any suggestions how can I bring the Linux back.
 


@vijay ganji
G'day and welcome.
I am not that advanced in the Linux world as I had to look up the what mv did.
So that raised this question. Were trying to rename a file?
Also What distro are you using?
But to help you I will hopefully summon up a couple of the wizards of Linux to help us both understand.
@wizardfromoz @KGIII
 
G'day vijay, Welcome to Linux.org

Do you have Timeshift set up/installed.......have saved any snapshots at all?

Which Linux are you running?/.....more detail, Please.
 
G'day @vijay ganji and welcome to linux.org, from another Aussie :)

OK, centOS 8.

@f33dm3bits - Mate can you take a look at this when you get time? Also give me thoughts on whether this is better placed in Redhat and Derivatives.

Thanks, and thanks to Davy and Brian.

Wizard
 
Rhel and clones are for people who actually know what they are doing. I am assuming new is a directory, what happens when you reboot your system now? As well as the moment you ran what you did you should not be able to run anything else because all the commands in those paths are gone.
 
Last edited:
I just tried it on virtual system and after I do it I can't do anything anymore so the same goes for you, it seems after I reboot everything is back to normal What happens when you reboot your system?
 
I just tried it on virtual system and after I do it I can't do anything anymore so the same goes for you, it seems after I reboot everything is back to normal What happens when you reboot your system?

I don't think he's got much chance of returning the system to its first estate and most likely the damage is just too much But
Do you think he might be able to do anything by changing the " root path " in the grub files at the grub rescue menu or grub edit menu in general when booting ??
 
I don't think he's got much chance of returning the system to its first estate and most likely the damage is just too much But
Do you think he might be able to do anything by changing the " root path " in the grub files at the grub rescue menu or grub edit menu in general when booting ??
I've helped someone on here on the forum here before who did something similar under Ubuntu, the use rm -f instead of mv. I got them boot from LiveCD mount the root partition and then recreate the symlinks there. I suspect since in this case the files are move they are still there, when I tried the same thing on a vm with CentOS8, I was able to do nothing and then after I rebooted my system booted normally and the files and directories were all under / again.
 

Members online


Latest posts

Top