> > Once it knows the target (b) is a directory, if you're using -T, mv knows > that it must fail -- rename ("anything", "directory") will always fail.
Only if "directory" is not empty. POSIX requires "If the old argument points to the pathname of a directory, the new argument shall not point to the pathname of a file that is not a directory. If the directory named by the new argument exists, it shall be removed and old renamed to new. In this case, a link named new shall exist throughout the renaming operation and shall refer either to the directory referred to by new or old before the operation began. If new names an existing directory, it shall be required to be an empty directory." Therefore, we have found another 'mv -f -T' bug: $ mkdir dir other $ mv -fT other dir should succeed, not fail. -- Eric Blake _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils