Re:Windows is the strangest, or hardest, operating system to...
by pxc on Wednesday November 30, 2022 @11:32AM
(#33803191)
> Lets say a process has a file open. Lets say it is a really big one, like 200GB. Ok, so our disk is nearly out of space, better delete this 200GB file, problem solved right?
Not naively intuitive, but for this you can write an empty file to the large open file with shell redirection.
cat /dev/null > /path/to/big/file
and that will free up the space on disk immediately. Not great, but more or less nicely handles the somewhat common runaway log file case.
I get how this corner case sucks, but to me it seems so much better than the endless parade of reboots and application restarts necessitated by file locking in the Windows world.
Not naively intuitive, but for this you can write an empty file to the large open file with shell redirection.
and that will free up the space on disk immediately. Not great, but more or less nicely handles the somewhat common runaway log file case.I get how this corner case sucks, but to me it seems so much better than the endless parade of reboots and application restarts necessitated by file locking in the Windows world.