Summary: | mv a.file b.file /doesnotexist results in usage message; not user friendly | ||
---|---|---|---|
Product: | Base System | Reporter: | Enji Cooper <ngie> |
Component: | bin | Assignee: | Jilles Tjoelker <jilles> |
Status: | Closed FIXED | ||
Severity: | Affects Many People | CC: | emaste, jilles |
Priority: | --- | Flags: | jilles:
mfc-stable10+
jilles: mfc-stable9- jilles: mfc-stable8- |
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
Enji Cooper
2015-06-23 21:55:03 UTC
What does Fedora show for the same case? That is, mv file1 file2 directory-that-does-not-exist/ (In reply to Ed Maste from comment #1) CentOS 7.1 reports: mv: target ‘/tmp/foo-bar’ is not a directory [ngie@wkstn-lnx-ngie ~]$ touch file1 file2 [ngie@wkstn-lnx-ngie ~]$ mv file1 file2 directory-that-does-not-exist/ mv: target ‘directory-that-does-not-exist/’ is not a directory [ngie@wkstn-lnx-ngie ~]$ cat /etc/redhat-release Fedora release 20 (Heisenbug) This was already fixed for cp a while ago. It should be easy to port over. A commit references this bug: Author: jilles Date: Sun Jun 28 21:36:01 UTC 2015 New revision: 284916 URL: https://svnweb.freebsd.org/changeset/base/284916 Log: mv: Improve message when moving two or more files to non-directory. The message text is from cp, which has had a nicer message for this since 2007 (PR bin/50656). As with cp, the exit status changes from 64 to 1. PR: 201083 MFC after: 1 week Changes: head/bin/mv/mv.c Fixed in head. A commit references this bug: Author: jilles Date: Sat Aug 22 21:35:36 UTC 2015 New revision: 287027 URL: https://svnweb.freebsd.org/changeset/base/287027 Log: MFC r284916: mv: Improve message when moving two or more files to non-directory. The message text is from cp, which has had a nicer message for this since 2007 (PR bin/50656). As with cp, the exit status changes from 64 to 1. PR: 201083 Changes: _U stable/10/ stable/10/bin/mv/mv.c |