ln -f

Guy Harris guy at auspex.auspex.com
Sat Jul 28 04:45:56 AEST 1990


>But that doesn't give the same result.  If you remove file2 first, then
>there is a brief window between the 'rm' and the 'ln' during which no
>file named file2 exists.  
>If you use a version of 'ln' that clobbers file2 and replaces it with a
>link to file1 in an atomic operation, there is no such window.

As far as I know, there's no such atomic operation, either; I sure
haven't seen any such operation in any UNIX system I've ever run into.

Given that, every version of "ln" I know of that removes the target
first has to first "unlink()" the target, and then do the "link()".  As
such, the window is still there....



More information about the Comp.unix.wizards mailing list