Swarles Posted June 25, 2023 Share Posted June 25, 2023 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... Quote Link to comment
NewDisplayName Posted June 25, 2023 Share Posted June 25, 2023 this nearly happend to me, so i was typing rm -rf and was tabbing for directories and i had a lag so i nearly removed /something/ instead of /something/something... since then i always tripple check before pressing enter (usually i like to quene my commands becaus ei can type faster then the pc, but not with rm rf ;)) Quote Link to comment
Archonw Posted June 26, 2023 Share Posted June 26, 2023 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 Quote Link to comment
Frank1940 Posted June 26, 2023 Share Posted June 26, 2023 (edited) 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! https://en.wikipedia.org/wiki/Rm_(Unix) Edited June 26, 2023 by Frank1940 1 Quote Link to comment
NewDisplayName Posted June 26, 2023 Share Posted June 26, 2023 yes i also do that instead of starting with rm i start with ls and change ls afterwards Quote Link to comment
Recommended Posts
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.