4.3BSD-UWisc/man/cat1/mv.1

Compare this file to the similar file:
Show the results in this format:




MV(1)               UNIX Programmer's Manual                MV(1)



NAME
     mv - move or rename files

SYNOPSIS
     mv [ -i ] [ -f ] [ - ] file1 file2

     mv [ -i ] [ -f ] [ - ] file ... directory

DESCRIPTION
     _M_v moves (changes the name of) _f_i_l_e_1 to _f_i_l_e_2.

     If _f_i_l_e_2 already exists, it is removed before _f_i_l_e_1 is
     moved.  If _f_i_l_e_2 has a mode which forbids writing, _m_v prints
     the mode (see _c_h_m_o_d(2)) and reads the standard input to
     obtain a line; if the line begins with y, the move takes
     place; if not, _m_v exits.

     In the second form, one or more _f_i_l_e_s (plain files or direc-
     tories) are moved to the _d_i_r_e_c_t_o_r_y with their original
     file-names.

     _M_v refuses to move a file onto itself.

     Options:

     -i   stands for interactive mode. Whenever a move is to
          supercede an existing file, the user is prompted by the
          name of the file followed by a question mark. If he
          answers with a line starting with 'y', the move contin-
          ues. Any other reply prevents the move from occurring.

     -f   stands for force. This option overrides any mode res-
          trictions or the -i switch.

     -    means interpret all the following arguments to _m_v as
          file names.  This allows file names starting with
          minus.

SEE ALSO
     cp(1), ln(1)

BUGS
     If _f_i_l_e_1 and _f_i_l_e_2 lie on different file systems, _m_v must
     copy the file and delete the original.  In this case the
     owner name becomes that of the copying process and any link-
     ing relationship with other files is lost.









Printed 12/27/86         April 29, 1985                         1