And that is why snapshots exist
And that is why snapshots exist
Though the Windows thing was really funny π.
And that is why snapshots exist
Though the Windows thing was really funny π.
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 of rm -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.
Machines will always do what you tell them to do, as long as you do what they say.
Yes, the file itself (so the data and inode) is not gone as long as the handles live on. Only the reference is gone. You canstill recover the file. https://superuser.com/questions/283102/how-to-recover-deleted-file-if-it-is-still-opened-by-some-process#600743
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.
Tell that to my dded porn collection.
I like the windows delete philosophy of asking me before I delete something.
I fucking hate the windows delete philosophy of telling me I don't have access after I said yes.
I'm this close to daily driving as Sadmin
Better would be to delete without confirmation but being able to quickly reverse it with Ctrl+Z
Siebel admin �
Sad man π
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.
The cloud is just someone else's trash can
That's because our all file systems are god's trash can.
Outlook on Exchange is like this. You can delete stuff to the Deleted Items directory. If you delete it from there it goes into another area called 'Recover deleted items'.
GUI file managers generally have "Trash" feature as well.
They usually support one but it is generally not provided by the file manager it's self. This means that assuming that the file managers use the same trash system you can trash a file on one recover it another.
The windows shell has really gone downhill in recent years, with spontaneous file locks and random hangs
It's always the AV...
I'm so annoyed when I tell rm
to delete a terabyte of data and it's nowhere near instant. I'd have probably gone insane if I was using Windows.
1TB for Windows... depends on file size, but let's presume you have 1TB of Word documents... just hit Enter and go watch the Matrix trilogy.
"what are you trying to tell me? I'll be able to select 'yes' when it asks me if I'm sure I want to delete?"
"No, Neo. I'm saying when you switch to Linux you won't have to."
Akchooly, what you're referring to as terabyte (TB) is called tebibyte (TiB), because window$ suck and JADEC made everyone believe that binary units are metric units, which is stupid. But we have the savior IEC which KDE is using in all of their software and I respect that.
Left side: I regularly go bowling with the demon core
Right side: I have read the demon coreβs wiki 314 times
314 π€... like as in Pi*100?
Mere coincidence
I never deleted my root system with rm but I did dd go sda instead of sdb and ended up losing my data.
Holy shit, me too. 6TiB poof
With great power comes great responsibility. Do check twice what you write.
Jokes aside, it has happened to almost everyone... and then you learn to QUADRUPLE CHECK dd commands.
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.
gio trash
This works for those of us in GNOME and GNOME-derived places.
Seems like KDE doesn't have anything quite so simple. A quick web search suggests the correct command is kioclientN move filename trash:/
where N is the version number of kioclient. Very verbose. Worthy of a shell alias
.
Then there's stuff like bashtrash. Or just write a small function, without full XDG compliance and all the edge cases.
Now wonder, which one is will be preferred by people who aren't tech savvy.
They are not likely to be using the terminal. Pretty much every graphical file browser will ask for confirmation upon delete, and many will use a rubbish bin by default.
To be fair, assuming you are not using a wastebasket which comes pre installed in a lot of distros, you still need the right permissions to delete files that belong to the system and if you're using rm you have to use the -rf option to remove a folder and it's contents.
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?
Use the --force Luke
undefined
-confirm:$false
Yeah, but get this! It's not enough to just envoke cmd in Windows with just Win+R (sorry, sorry... Super+R π), even though you're invoking it from an admin account, no sir, it's still just a plain user as long as cmd is concerned π.
And this is what you get when you wanna do backwards compatibility all the way down to DOS π.
We have pretty good backwards compatibility too, to my knowledge it's actually better.
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 π.
Every time I see I've of these memes my mind goes straight to infomercials.
Oh well. Didn't really like my mum that much anyways π’
Mom enters the chat...
One of my first experiences with Linux at university was watching a classmate install Slackware, and then (for a laugh) dragging everything into the recycle bin.
They got a passing grade, because the lecturer saw their working installation, but they learned a valuable lesson in Linux that if you delete something, it'll fucking delete it.
Is that actually true? Does Windows check every file with Defender before deleting it?
Not just every file deleted, every file written to disk as well (downloaded, extracted from an archive, whatever).
It's also how most AV software works, except Defender is slow AF.
also, defender is synchronous by default (e.g. nothing gets written until it gets scanned, and scanning parallelization is limited), and can only act asynchronously (aka write first, then queue check) on "trusted dev drives" (aka ReFS-based virtual vhdx partitions aimed at developers as a solution to horrible ntfs throughput, especially if defender is enabled)
Huh. All that security, and yet there are still so many viruses capable of infecting windows.
I thought it checks every file closed
4k big
Is this AI-written?
I don't think LLMs usually make this kind of mistake. Maybe it's not written by a native speaker. Also it's a doge meme, it could be just slightly bad grammar on purpose.
4e3 big