4 comments

[ 2.8 ms ] story [ 21.6 ms ] thread
I'm surprised this isn't in more standard libraries, are there any other atomic file operations being neglected like this?
I think the time it would take me to remember the command, look at the man page to see if I had it right, and then do the command, I could have done the three mv commands

mv zork mytemp

mv advent zork

mv mytemp advent

Not atomic. We are talking renameat2 () here