summaryrefslogtreecommitdiffstats
path: root/bin/cp/utils.c
diff options
context:
space:
mode:
authormharo <mharo@FreeBSD.org>1999-08-26 02:44:56 +0000
committermharo <mharo@FreeBSD.org>1999-08-26 02:44:56 +0000
commit5f9fd788f5751f044f8cf0fb01e67fb1e88a1acc (patch)
treeffb954a44343badb205e655c73d0df289677ed8b /bin/cp/utils.c
parentb658a57c222af53cd4c00082ea592a9d9a5921f7 (diff)
downloadFreeBSD-src-5f9fd788f5751f044f8cf0fb01e67fb1e88a1acc.zip
FreeBSD-src-5f9fd788f5751f044f8cf0fb01e67fb1e88a1acc.tar.gz
Add a verbose mode to show what files are being copied.
Idea taken from obrien. Reviewed by: obrien
Diffstat (limited to 'bin/cp/utils.c')
-rw-r--r--bin/cp/utils.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index 162a446..837a3da 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)utils.c 8.3 (Berkeley) 4/1/94";
#endif
static const char rcsid[] =
- "$Id: utils.c,v 1.22 1999/04/25 21:13:32 imp Exp $";
+ "$Id: utils.c,v 1.23 1999/05/08 10:19:29 kris Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -118,6 +118,9 @@ copy_file(entp, dne)
rval = 0;
+ if (vflag)
+ printf("%s -> %s\n",entp->fts_path, to.p_path);
+
/*
* Mmap and write if less than 8M (the limit is so we don't totally
* trash memory on big files. This is really a minor hack, but it
@@ -321,7 +324,7 @@ void
usage()
{
(void)fprintf(stderr, "%s\n%s\n",
-"usage: cp [-R [-H | -L | -P]] [-f | -i] [-p] src target",
-" cp [-R [-H | -L | -P]] [-f | -i] [-p] src1 ... srcN directory");
+"usage: cp [-R [-H | -L | -P]] [-f | -i] [-p] [-v] src target",
+" cp [-R [-H | -L | -P]] [-f | -i] [-p] [-v] src1 ... srcN directory");
exit(1);
}
OpenPOWER on IntegriCloud