- cross-posted to:
- programmerhumor@lemmy.ml
“Hey Linux, can you just delete this file please?”
“Sure thing bud, a program is using it, it’s ok, I will just unlink the inode anyway, the program can still access it until it closes the file”
This is honestly one of my favorite features of the linux filesystem. As a dev it makes things like replacing and hot-reloading plugins way easier.
It turns out you can kind of get the same functionality on Windows if you rename the open file and place the new one with the original name, but it’s a bit of a hack.
It turns out you can kind of get the same functionality on Windows if you rename the open file and place the new one with the original name, but it’s a bit of a hack.
Only if you don’t have OneDrive working. In that case, you have to wait for it to sync or it won’t go through.
Anytime I have an issue at work where I can’t change or delete a file, it’s a 50/50 split between Excel and OneDrive being the cause
Meanwhile on Linux: /boot successfully deleted
In case anyone is interested, there’s a powertoy called file locksmith that will show what’s using it and let you kill it: https://learn.microsoft.com/en-us/windows/powertoys/file-locksmith
Sysinternals handle is lightweight unitasker for this too, better option for servers.
“Time to see who’s stopping me from deleting this file… svchost??? Goddamn it!”
I’m in this picture and I don’t like it. I was trying to diagnose a prod server crashing this very Wednesday and seeing the lines of svchost.exe is so fucking maddening… I’m glad ProcessExplorer was there to give some useful fucking info, at least.
Well, it could be an executable disguising itself as svchost. Pretty common for malware or video game cheats to name their executables svchost.exe to hide from anti-virus/anticheat
Probably the indexing service, it’s always the indexing service.
just kill it
TBF the task manager and those windows explorer dialogues were programed in like 1996 and it’s probably one of the best functioning feature in Windows so changing it too much carries high risks.
changing it too much carries high risks
This is such a Windows way of thinking. Why does every other OS constantly change and evolve but Windows is like “can’t touch this code from a quarter century ago?”