-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Using uutils, running
$ touch a b
$ mkdir c
$ ln -snf a b c/
results in an error that says
ln: Already exists
ln: will not overwrite just-created 'c/' with 'b'
whereas, using GNU coreutils, the result is that the symlinks c/a and c/b are created successfully. However, if you run it when c doesn't exist, or when it is a file, both give an error saying ln is not a directory. If you use -n without -f, or vice versa, the symlinks are created with no problems using both versions.
I'm not entirely sure what's going on here. When c/ is a directory, its appears to want it to be a non-existing destination file to link to, whereas when c either doesn't exist or is a file, it wants it to be a directory to put the link into.
Furthermore, when c/ is a directory, the first one fails with a simple error saying the destination already exists, but the second one fails with an error that suggests it thinks linking a to c actually worked, and it just doesn't want to overwrite the same file twice.
uutils: 0.0.24
GNU: 9.4
Platform: Gentoo Linux