bug#81377: mv -Tn suceeds if target directory exists, no error printed

Florian Weimer via GNU coreutils Bug Reports <[email protected]> Wed, 08 Jul 2026 14:33:19 +0200
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <[email protected]>
Based on the documentation, I would have expected an error in this case.

mkdir a a/1 b b/2
mv -Tn a b

Exit status is zero.  The only relevant system call in the strace output
is this one:

renameat2(AT_FDCWD, "a", AT_FDCWD, "b", RENAME_NOREPLACE) = -1 EEXIST (File exists)

Seen with: coreutils-9.7-9.fc43.x86_64

Thanks,
Florian