diff options
author | jilles <jilles@FreeBSD.org> | 2015-08-22 21:35:35 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-08-22 21:35:35 +0000 |
commit | 403ac3fe2ac5f9025e10e44971d01a8c6ef8d0ae (patch) | |
tree | 3edb8ea42624d14550ed003ac386f1461a8397a9 /bin/mv | |
parent | 170343c951ee836a0be987536f35a69bbe3670de (diff) | |
download | FreeBSD-src-403ac3fe2ac5f9025e10e44971d01a8c6ef8d0ae.zip FreeBSD-src-403ac3fe2ac5f9025e10e44971d01a8c6ef8d0ae.tar.gz |
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
Diffstat (limited to 'bin/mv')
-rw-r--r-- | bin/mv/mv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c index 2710f89..566167d 100644 --- a/bin/mv/mv.c +++ b/bin/mv/mv.c @@ -122,7 +122,7 @@ main(int argc, char *argv[]) */ if (stat(argv[argc - 1], &sb) || !S_ISDIR(sb.st_mode)) { if (argc > 2) - usage(); + errx(1, "%s is not a directory", argv[argc - 1]); exit(do_move(argv[0], argv[1])); } |