Undo sudo rm -R /*
Solution 1
There is no undo for sudo
. It's a one time root runtime privilege. To better explain, it's like deleting your Win32
folder for Windows and wondering how to get it back. A simple re-install should fix your issue. I would recommend next time using man rm
to better understand what the command does.
A simple reading of any terminal command before executing them would be in your best interest for you server, so no more unnecessary functions are carried out!
This should better Illustrate my meaning:
Solution 2
While there is no way to undelete the files
Your sites are still up so you can save the content from the browser. Of course if the sites are database driven then this will not help much.
But if your sites are mostly static html and they are still in memory, you can use some browser tool to save them from your browser.
There are some tools that can help with that, at the very least any browser can save complete html.
HTH
chad
Updated on September 18, 2022Comments
-
chad over 1 year
In my program I have a file that contains the main function and another file that contains other functions. I have a struct and have created a vector of it:
struct Animal { string name; string type; string regestration; int problem; }; vector<Animal> animals;
In my header file for the other functions I have the following:
void loadAnimals(string &file, vector<Animal> animals);
When compiling I get the error :
'Animal' was not declared in this scope
for the above line.Do I need to declare the struct again in the header file? Or am I just using the wrong syntax
-
Jetson Earth over 9 yearsYou mean like restoring from backup?
-
Robobenklein over 9 yearsThere is no 'simple' way to do so, a backup is indeed your best option. Otherwise you may need some seriously professional data forensics workers.
-
Thomas Ward almost 3 yearsIf you have no backups, you're hosed. No chance of restoring from this type of action if you don't have backups.
-
-
Andrew Lynch over 9 yearsI hate myself for being so stupid. If I reinstall Ubuntu 12.04 will my data be gone?
-
Virusboy over 9 yearsOnly if the Part is shared with your data. If so, yes. To be honest here no server should share data and OS.
-
Andrew Lynch over 9 yearsIt's a dedicated server. So the entire server is mine. Hence why I was able to be so stupid.
-
Virusboy over 9 yearsYes but does your server have one hard drive/one Partition?
-
Andrew Lynch over 9 yearsIts on a single drive :/ . Any idea how all my sites are still running? I assume if I restart is game over.
-
Virusboy over 9 yearsYea your boned.
-
younes over 9 yearsit is a classical suicide attempt that has succeeded, better if you, take out your erver's hard driver and try to extract recent data (if there is any) and then reinstall/apply backup
-
Panther over 9 yearsYour data is already gone, lol