xref: /386bsd/usr/share/man/cat1/mv.0 (revision a2142627)
1MV(1)                       386BSD Reference Manual                      MV(1)
2
3NNAAMMEE
4     mmvv - move files
5
6SSYYNNOOPPSSIISS
7     mmvv [--ff | --ii] _s_o_u_r_c_e _t_a_r_g_e_t
8     mmvv [--ff | --ii] _s_o_u_r_c_e ... _s_o_u_r_c_e _d_i_r_e_c_t_o_r_y
9
10DDEESSCCRRIIPPTTIIOONN
11     In its first form, the mmvv utility renames the file named by the _s_o_u_r_c_e
12     operand to the destination path named by the _t_a_r_g_e_t operand.  This form
13     is assumed when the last operand does not name an already existing
14     directory.
15
16     In its second form, mmvv moves each file named by a _s_o_u_r_c_e operand to a
17     destination file in the existing directory named by the _d_i_r_e_c_t_o_r_y
18     operand.  The destination path for each operand is the pathname produced
19     by the concatenation of the last operand, a slash, and the final pathname
20     component of the named file.
21
22     The following options are available:
23
24     --ff    Do not prompt for confirmation before overwriting the destination
25           path.  (The --ii option is ignored if the --ff option is specified.)
26
27     --ii    Causes mmvv to write a prompt to standard error before moving a file
28           that would overwrite an existing file.  If the response from the
29           standard input begins with the character ``y'', the move is
30           attempted.
31
32     It is an error for either the _s_o_u_r_c_e operand or the destination path to
33     specify a directory unless both do.
34
35     If the destination path does not have a mode which permits writing, mmvv
36     prompts the user for confirmation as specified for the --ii option.
37
38     As the rename(2) call does not work across file systems, mmvv uses cp(1)
39     and rm(1) to accomplish the move.  The effect is equivalent to:
40
41           rm -f destination_path && \
42           cp -pr source_file destination && \
43           rm -rf source_file
44
45     The mmvv utility exits 0 on success, and >0 if an error occurs.
46
47SSEEEE AALLSSOO
48     cp(1)
49
50SSTTAANNDDAARRDDSS
51     The mmvv utility is expected to be IEEE Std1003.2 (``POSIX'') compatible.
52
53BSD Experimental                 July 27, 1991                               1
54
55
56
57
58
59
60
61
62
63
64
65
66
67