32v 1m mv

From Computer History Wiki
Revision as of 16:58, 26 October 2009 by Neozeed (talk | contribs) (New page: MV(1) UNIX Programmer's Manual MV(1) == NAME == mv - move or rename files == SYNOPSIS == mv file1 file2 mv file ... directory == DESCRIP...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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


NAME

    mv  -  move or rename files

SYNOPSIS

    mv file1 file2
    mv 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.

SEE ALSO

    cp(1), chmod(2)

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.
    _M_v should take -f flag, like _r_m, to suppress the question if
    the target exists and is not writable.