From c7cd1ca02ab56d97862db49dc3bf20ba8b8283ff Mon Sep 17 00:00:00 2001 From: jilles Date: Sat, 22 Aug 2015 21:35:35 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.freebsd.org/base/stable/10@287027 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- bin/mv/mv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mv/mv.c b/bin/mv/mv.c index 2710f8907..566167d03 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])); } -- 2.42.0