Though the Windows thing was really funny 😂.
I never deleted my root system with rm but I did dd go sda instead of sdb and ended up losing my data.
I did, and it was fast. I was a complete noob, so I thought rm -rf /* would delete everything in the current folder. I hit Ctrl + C, but it was too late. Took a few seconds to wipe out the whole system.
Oh well. Didn’t really like my mum that much anyways 😢
One drive has a trash for the trash. I’m still not convinced those files are gone after the 2nd empty, I think they just don’t show the other trash cans
It’s trash cans all the way down.
That’s because our all file systems are god’s trash can.
If you’re going for cli, windows also can do rm -r -Force <path>
Or just do Shift Delete in Explorer.
You can do that?
Yes. Place finger on key and press lightly downward. ;)
Use the --force Luke
backups / btrfs snapshots
Btrfs snapshots/subvolumes can now also be deleted with rm. It’s no longer necessary to use ‘btrfs subvolume delete’
Really?
As I always say, you get the best linux info from linux memes 😁.
Yep! (finally)
the linux-file-deletion is used as a example for good software design. It has a very simple interface with little room for error while doing exactly what the caller intended.
In John Ousterhout’s “software design philosophy” a chapter is called “define errors out of existence”. In windows “delete” is defined as “the file is gone from the HDD”. So it must wait for all processes to release that file. In Linux “unlink” is defined as “the file can’t be accessed anymore”. So the file is gone from the filesystem immediately and existing file-handles from other processes will life on.
The trade-off here is: “more errors for the caller of delete” vs “more errors due to filehandles to dead files”. And as it turns out, the former creates issues for both developers and for users, while the later creates virtually no errors in practice.
doing exactly what the caller intended.
No, no. Exactly what the user told it to do. Not what they intended. There’s a difference.
Exactly type
rm -rf /
instead ofrm -rf ./
and you ducked up. Well you messed up a long time ago by having privileges to delete everything, but then again, you are human, some mistakes will be made.