4BSD/usr/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 ] file1 file2

     mv [ -i ] 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 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.

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.

     Directories may only be moved within the same parent direc-
     tory.











Printed 11/10/80                                                1