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.
 


Nik-Ken-Bah

Well-Known Member
Joined
Sep 9, 2019
Messages
708
Reaction score
673
Credits
2,477
@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
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
4,412
Reaction score
3,881
Credits
24,549
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.
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,117
Reaction score
5,994
Credits
23,565
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
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,471
Reaction score
3,178
Credits
32,448
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:

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,471
Reaction score
3,178
Credits
32,448
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?
 

tom777

New Member
Joined
Apr 23, 2021
Messages
16
Reaction score
12
Credits
176
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 ??
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,471
Reaction score
3,178
Credits
32,448
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.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Top