Disclaimer: I have carelessly committed this nonsense too. Thankfully, the important data was backed up. I used a live USB to access the nuked OS partition and used chroot to repopulate the deleted system files. Didn’t even have to reinstall the OS.
Always have a disaster plan. If you have a btrfs partition, even periodic btrfs snapshots are a cheap lifesaver. Everything else can be saved like a breeze with some terminal magic.
Comments
I do not understand?
This deletes everything in root; a great way to break your OS and lose all data too.
OP meant to run
Note the period, which represents the current directory. So this deletes everything in the current directory instead of the entire filesystem
Nowadays
rmcommand will prevent doing this, without option--no-preserve-root.Yes, thats right…
Why not just:
rm -r *What is the necessity of that sudo,
-fand/?Disclaimer: I have carelessly committed this nonsense too. Thankfully, the important data was backed up. I used a live USB to access the nuked OS partition and used chroot to repopulate the deleted system files. Didn’t even have to reinstall the OS.
Always have a disaster plan. If you have a btrfs partition, even periodic btrfs snapshots are a cheap lifesaver. Everything else can be saved like a breeze with some terminal magic.
Sign in to comment. Sign in