]> arthur.barton.de Git - netatalk.git/commitdiff
Finished ad mv
authorFrank Lahm <franklahm@googlemail.com>
Tue, 12 Oct 2010 11:41:28 +0000 (13:41 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Tue, 12 Oct 2010 11:41:28 +0000 (13:41 +0200)
NEWS
bin/ad/ad_mv.c

diff --git a/NEWS b/NEWS
index d539795fea59483555ff7722ebef70dee01e7144..a962a4ccfd2678ca1755a7d0ddb9112a75a94c48 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Changes in 2.2
        use --enable-ddp.
 * NEW: ad utility: ad cp
 * NEW: ad utility: ad rm
+* NEW: ad utility: ad mv
 * NEW: afpd: dynamic directoy and CNID cache
 * NEW: afpd: POSIX 1e ACL support
 * NEW: afpd: automagic Zeroconf registration with avahi, registering both
index a02777c1d0f23b9f354c50ab274b5d0e8f294b19..b7c611d95243f573ab70dc04b2631c1d2ae70596 100644 (file)
@@ -121,7 +121,23 @@ static void usage_mv(void)
 {
     printf(
         "Usage: ad mv [-f | -i | -n] [-v] source target\n"
-        "       ad mv [-f | -i | -n] [-v] source ... directory\n"
+        "       ad mv [-f | -i | -n] [-v] source ... directory\n\n"
+        "Move files around within an AFP volume, updating the CNID\n"
+        "database as needed. If either:\n"
+        " - source or destination is not an AFP volume\n"
+        " - source volume != destinatio volume\n"
+        "the files are copied and removed from the source.\n\n"
+        "The following options are available:\n\n"
+        "   -f   Do not prompt for confirmation before overwriting the destination\n"
+        "        path.  (The -f option overrides any previous -i or -n options.)\n"
+        "   -i   Cause mv to write a prompt to standard error before moving a file\n"
+        "        that would overwrite an existing file.  If the response from the\n"
+        "        standard input begins with the character `y' or `Y', the move is\n"
+        "        attempted.  (The -i option overrides any previous -f or -n\n"
+        "        options.)\n"
+        "   -n   Do not overwrite an existing file.  (The -n option overrides any\n"
+        "        previous -f or -i options.)\n"
+        "   -v   Cause mv to be verbose, showing files after they are moved.\n"
         );
     exit(EXIT_FAILURE);
 }
@@ -499,7 +515,7 @@ static int copy(const char *from, const char *to)
 
     /* Copy source to destination. */
     if (!(pid = fork())) {
-        execl(adexecp, "cp", vflg ? "-Rpv" : "-Rp", "--", from, to, (char *)NULL);
+        execl(adexecp, "ad", "cp", vflg ? "-Rpv" : "-Rp", from, to, (char *)NULL);
         _exit(1);
     }
     while ((waitpid(pid, &status, 0)) == -1) {
@@ -523,7 +539,7 @@ static int copy(const char *from, const char *to)
 
     /* Delete the source. */
     if (!(pid = fork())) {
-        execl(adexecp, "rm", "-Rf", "--", from, (char *)NULL);
+        execl(adexecp, "ad", "rm", "-R", from, (char *)NULL);
         _exit(1);
     }
     while ((waitpid(pid, &status, 0)) == -1) {