Date: Sat, 28 Nov 1998 15:00:45 -0500 (EST) From: jcplace@ibm.net To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/8881: mv missing verbose switch Message-ID: <199811282000.PAA00762@ibm.net.>
index | next in thread | raw e-mail
>Number: 8881
>Category: bin
>Synopsis: mv missing verbose switch
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Nov 28 12:10:01 PST 1998
>Last-Modified:
>Originator: John C. Place
>Organization:
>Release: FreeBSD 2.2.7-RELEASE i386
>Environment:
>Description:
I miss the verbose switch one some of the more common file commands
ie: cp,mv,rm
>How-To-Repeat:
>Fix:
Diff file below
--- mv.org Sat Nov 28 10:33:27 1998
+++ mv.c Sat Nov 28 14:48:46 1998
@@ -62,7 +62,7 @@
#include "pathnames.h"
-int fflg, iflg;
+int fflg, iflg, vflg;
int copy __P((char *, char *));
int do_move __P((char *, char *));
@@ -80,7 +80,7 @@
int ch;
char path[MAXPATHLEN];
- while ((ch = getopt(argc, argv, "fi")) != -1)
+ while ((ch = getopt(argc, argv, "fiv")) != -1)
switch (ch) {
case 'i':
iflg = 1;
@@ -90,6 +90,9 @@
fflg = 1;
iflg = 0;
break;
+ case 'v':
+ vflg = 1;
+ break;
default:
usage();
}
@@ -176,6 +179,9 @@
group_from_gid(sb.st_gid, 0), to, YESNO);
ask = 1;
}
+ if(vflg) {
+ (void)fprintf(stderr, "Moving %s to %s\n", from, to);
+ }
if (ask) {
first = ch = getchar();
while (ch != '\n' && ch != EOF)
@@ -349,7 +355,7 @@
usage()
{
(void)fprintf(stderr, "%s\n%s\n",
- "usage: mv [-f | -i] source target",
- " mv [-f | -i] source ... directory");
+ "usage: mv [-f | -i] [-v] source target",
+ " mv [-f | -i] [-v] source ... directory");
exit(1);
}
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811282000.PAA00762>
