On Sun, Dec 26, 2010 at 07:41:53PM +0100, Ingo Schwarze wrote:
> 
> Index: mv.1
> ===================================================================
> RCS file: /cvs/src/bin/mv/mv.1,v
> retrieving revision 1.26
> diff -u -r1.26 mv.1
> --- mv.1      3 Sep 2010 09:53:20 -0000       1.26
> +++ mv.1      26 Dec 2010 18:39:33 -0000
> @@ -61,18 +61,25 @@
>  .Nm
>  moves each file named by a
>  .Ar source
> -operand to a destination specified by the
> +operand into the destination specified by the

this seems correct, but it was anyway. what are you trying to change
here?

other than that i think this diff is fine. but a technical ok would be
useful too.

jmc

>  .Ar directory
>  operand.
>  It is an error if the
>  .Ar directory
> -operand does not exist.
> +does not exist.
>  The destination path for each
>  .Ar source
>  operand is the pathname produced by the concatenation of the
>  .Ar directory
>  operand, a slash, and the final pathname component of the named file.
>  .Pp
> +In both forms, a
> +.Ar source
> +operand is skipped with an error message
> +when the respective destination path is a non-empy directory,
> +or when the source is a non-directory file but the destination path
> +is a directory, or vice versa.
> +.Pp
>  The options are as follows:
>  .Bl -tag -width Ds
>  .It Fl f
> @@ -117,9 +124,9 @@
>  to accomplish the move.
>  The effect is equivalent to:
>  .Bd -literal -offset indent
> -$ rm -f destination_path && \e
> -    cp -PRp source_file destination && \e
> -    rm -rf source_file
> +$ rm -df -- destination_path && \e
> +    cp -PRp -- source destination_path && \e
> +    rm -rf -- source
>  .Ed
>  .Sh EXIT STATUS
>  .Ex -std mv
> @@ -162,19 +169,27 @@
>  command appeared in
>  .At v1 .
>  .Sh CAVEATS
> -In the second synopsis form
> -if the destination path exists,
> -the
> +In the second synopsis form, incompatible file types in
>  .Ar source
> -operand and the destination path
> -must both be a file or must both be a directory
> -for the operation to succeed.
> +and
> +.Ar directory
> +cause partial moves:
>  For example, if
>  .Pa f
> -is a file and
> +and
> +.Pa g
> +are non-directory files and
>  .Pa d
>  and
>  .Pa d/f
> -are directories, the following command will fail:
> +are directories, the command
>  .Pp
> -.Dl $ mv f d
> +.Dl $ mv f g d
> +.Pp
> +will print an error message, leave
> +.Pa f
> +where it is, move
> +.Pa g
> +to
> +.Pa d/g
> +and return a non-zero exit status.

Reply via email to