[0m


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



[1mNAME
     [0mmv, mv0 - move or rename files

[1mSYNOPSIS
     mv [0m[ [1m-i [0m] [ [1m-f [0m] [ [1m- [0m] file1 file2

     [1mmv [0m[ [1m-i [0m] [ [1m-f [0m] [ [1m- [0m] file ... directory

[1mDESCRIPTION
     [0m_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 [1my, [0mthe move takes
     place; if not, _m_v exits.  When the -f option is used or if
     the standard input is not a terminal, then no questions are
     asked and the _m_v is done where permitted.

     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:

     [1m-i   [0mstands 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.

     [1m-f   [0mstands for force. This option overrides any mode res-
	  trictions or the -i switch.

     [1m-	  [0mmeans interpret all the following arguments to _m_v as
	  file names.  This allows file names starting with
	  minus.

[1mSEE ALSO
     [0mcp(1), ln(1)

[1mBUGS
     [0mIf _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.

     When copying to an output file _m_v will create `holes' in the
     output file for completely zero disc blocks, this saves con-
     siderable disc space on R140 systems. Some NFS fileservers



Printed 28/10/93    Revision 1.5 of 02/11/90			1






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



     (eg those running 4.2BSD) have a bug which cause them to add
     a zero byte to files copied in this manner.  This can be
     avoided by using _m_v_0 which is identical to _m_v except that it
     copies the file byte for byte.



















































Printed 28/10/93    Revision 1.5 of 02/11/90			2



[0m