4 ms·
Linux does have the O_TMPFILE flag to open. This creates a file with no name. But importantly it still needs a directory path because it needs to know which fil
by kevincox 3y ago
Linux does have the O_TMPFILE flag to open. This creates a file with no name. But importantly it still needs a directory path because it needs to know which filesystem the data should be stored on. With your example if you wrote a few gigs of data to that fd before linking it the kernel would need to either buffer it (maybe swapping it out) or guess and then copy the data when it guesses wrong.