News for hackers. Stuff that matters.
Re:Japan HP accidentally deleted 77TB data in Kyoto U. super... by sillysaurusx on Thursday December 30, 2021 @06:56AM (#29736008)
“Emacs for example does create a new file and rename it over the old one when you save, usually, allocating a new inode as you say. By default it makes an exception if there are other hardlinks to the file.”

Though the trade off is that all operation ceases on a full hard drive.

I don’t have a better solution, but it’s worth noting.

Re:Japan HP accidentally deleted 77TB data in Kyoto U. super... by kragen on Thursday December 30, 2021 @07:50PM (#29743556)
Emacs gives you an error message in that case rather than destroying the old version of the file and then failing to completely write the new version, in the cases where it does the tempfile-then-rename dance. This is usually vastly preferable if Emacs or your computer crashes before you manage to free up enough space for a successful save.

It doesn't cease all operation; other Emacs features work as they normally do. Bash, by contrast, stops being able to tab-complete filenames, at precisely the time when you most need to be able to rapidly manipulate your files. At least, that's the case with the default completion setup in a few recent versions of Ubuntu.

Re:Japan HP accidentally deleted 77TB data in Kyoto U. super... by thaumasiotes on Thursday December 30, 2021 @07:31AM (#29736183)
Well, it looks like creating another hard link is a nearly-free solution. And beyond that, since emacs already has both behaviors, presumably you can tell it you want the in-place modification.
Re:Japan HP accidentally deleted 77TB data in Kyoto U. super... by kragen on Thursday December 30, 2021 @07:52PM (#29743573)
I think you can just customize the backup-by-copying variable to t, though I haven't tried it. Check the manual.
Re:Japan HP accidentally deleted 77TB data in Kyoto U. super... by vbezhenar on Thursday December 30, 2021 @07:41AM (#29736246)
Does it mean that I need to have extra free space? Does not sound good.