4 ms·
How about whenever you're writing a non=temporary file? I do this all the time: 1. Create temporary file in the same directory as the target path. 2. Write a
by mortehu 13y ago
How about whenever you're writing a non=temporary file? I do this all the time:
1. Create temporary file in the same directory as the target path.
2. Write and fsync the temporary file
3. Rename the temporary file to the target filename
Oh, and on Linux you can open even deleted files by using /proc/<N>/fd/<M>. It may look like a symlink, but it's not.
- justincormack 13y agoOK that's a good reason!
- justincormack 13y agoYou can create files form the fd you get from O_TMPFILE it turns out http://lwn.net/SubscriberLink/562488/3c6d56bef275c0b4/ http://lwn.net/SubscriberLink/562488/3c6d56bef275c0b4/