mv treats target_dir/ as file if it doesn't exist
SYNOPSIS mv [-if] source_file target_file mv [-if] source_file... target_dir DESCRIPTION In the first synopsis form, the mv utility shall move the file named by the source_file operand to the destination specified by the target_file. This first synopsis form is assumed when the final operand does not name an existing directory and is not a symbolic link referring to an existing directory. In this case, if source_file names a non-directory file and target_file ends with a trailing <slash> character, mv shall treat this as an error and no source_file operands will be processed.
$ /bin/touch a $ /bin/ls -ld b/ b/: No such file or directory $ /bin/mv a b/ $ /bin/ls -ld b/ b/: Not a directory
The /usr/xpg4/bin/mv behaves the same.