Jump to content

Well this sucks. I just "rm -r /*" my server...

Recommended Posts

Possibly the stupidest thing I have ever done. I finished transferring everything over to my new server today and I needed to delete a directories contents. Instead of using "rm -r ~/*" I missed the ~ so I wiped everything. Was a bad idea to use that to begin with. Worst part is that I had my cold backup drive plugged in (and mounted) as I was transferring data onto my new server. Not the end of the world for my personal documents cus extra backups, but there goes my server config, parity, docker configs and everything else.


SO my question is. Is there anything more stupid I could have possibly done? And what is my hopes of being able to recover my docker configs...

Link to comment

The easiest way would be to copy over your backup. Without there is no easy way. There are tools out there that can recover those data. This takes time and i did this once and it was no click and be happy way.
To avoid this in future, you can use an alias to be sure that this command will not be executed.

Gesendet von meinem Pixel 6 Pro mit Tapatalk

Link to comment

One thing to do is to always do a  


ls -al /[path-name] 


to see exactly what will happen when you use the very destructive  rm  command.  Than copy the complete path name from the   ls    command and paste it onto the rm  command. 


(I personally try to avoid using the   rm   command under any set of conditions.  The Web is full of so many tales of woe of the destruction this command has caused since it was first released back in November of 1971!    I would much rather take the time and use something with a graphic interface to show what I am going to be blowing into oblivion when I start a massive removal.  Think of mc, Krusader, Dynamix File Manager and, even, Windows Explorer!) 


EDIT:    Interesting reading!



Edited by Frank1940
  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...