3 ms·
> Linux, the OS says it is atomic nitpick: At least on some filesystems if you rename a.txt to overwrite b.txt and the machine crashes, you might end up both a
by NavinF 3y ago
> Linux, the OS says it is atomic
nitpick: At least on some filesystems if you rename a.txt to overwrite b.txt and the machine crashes, you might end up both a.txt and b.txt hardlinked so they contain the same data.
Of course this is no big deal since b.txt is still updated atomically so it contains the new data (assuming a.txt was fsynced) or the old data. I assume nobody depends on a.txt being deleted simultaneously.