this post was submitted on 22 Mar 2024
5 points (100.0% liked)

linuxmemes

20408 readers
961 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
5
submitted 6 months ago* (last edited 6 months ago) by [email protected] to c/[email protected]
 

Though the Windows thing was really funny πŸ˜‚.

top 30 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 6 months ago

backups / btrfs snapshots

[–] [email protected] 1 points 6 months ago (1 children)

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.

[–] [email protected] 1 points 6 months ago

doing exactly what the caller intended.

No, no. Exactly what the user told it to do. Not what they intended. There's a difference.

[–] [email protected] 1 points 6 months ago

The windows shell has really gone downhill in recent years, with spontaneous file locks and random hangs

It's always the AV...

[–] [email protected] 1 points 6 months ago

I never deleted my root system with rm but I did dd go sda instead of sdb and ended up losing my data.

[–] [email protected] 1 points 6 months ago* (last edited 6 months ago) (1 children)

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.

[–] [email protected] 1 points 6 months ago* (last edited 6 months ago) (1 children)

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.

[–] [email protected] 0 points 6 months ago

"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."

[–] [email protected] 1 points 6 months ago

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.

[–] [email protected] 1 points 6 months ago (1 children)

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

[–] [email protected] 1 points 6 months ago

Better would be to delete without confirmation but being able to quickly reverse it with Ctrl+Z

[–] [email protected] 1 points 6 months ago (2 children)

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

[–] [email protected] 1 points 6 months ago

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'.

[–] [email protected] 1 points 6 months ago (1 children)

It's trash cans all the way down.

[–] [email protected] 1 points 6 months ago (1 children)

The cloud is just someone else's trash can

[–] [email protected] 1 points 6 months ago (1 children)

You know what they say, one man's trash...

[–] [email protected] 1 points 6 months ago (1 children)
[–] [email protected] 1 points 6 months ago

Is another's CLOUD β˜οΈπŸ€“

[–] [email protected] 1 points 6 months ago (1 children)

GUI file managers generally have "Trash" feature as well.

[–] [email protected] 1 points 6 months ago

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.

[–] [email protected] 0 points 6 months ago (1 children)

Is that actually true? Does Windows check every file with Defender before deleting it?

[–] [email protected] 1 points 6 months ago* (last edited 6 months ago) (1 children)

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.

[–] [email protected] 0 points 6 months ago (1 children)

I thought it checks every file closed

[–] [email protected] 0 points 5 months ago (1 children)

No, it scans file headers when you do read/write operations on disk. Every AV works this way, except, as I said, Defender is slow AF.

[–] [email protected] 0 points 5 months ago (1 children)

I can't find talk I watched, but I found github issue it was based on.

Short version: Defender is triggered not on open, not on read or write, but on CloseHandle.

[–] [email protected] 0 points 5 months ago* (last edited 5 months ago) (1 children)

CloseHandle of what? Read/write operations?

[–] [email protected] 1 points 5 months ago

Found! Even metadata chamge.

[–] [email protected] -1 points 6 months ago (2 children)

Now wonder, which one is will be preferred by people who aren't tech savvy.

[–] [email protected] 1 points 6 months ago

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.

[–] [email protected] 1 points 6 months ago

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.