Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mv(1) — UTek W2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cp(1)

ln(1)



MV(1)                   COMMAND REFERENCE                   MV(1)



NAME
     mv - move or rename files

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

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

DESCRIPTION
     In the first form, mv moves (changes the name of) file1 to
     file2.  If file2 already exists, it is removed before file1
     is moved. If file2 has a mode which forbids writing, mv
     prints the mode (see chmod(2)) and reads the standard input
     to obtain a line; if the line begins with y, the move takes
     place; if not, mv exits.

     In the second form, one or more files (plain files or
     directories) are moved to the directory with their original
     file names.

     Mv refuses to move a file onto itself.

OPTIONS
     -f  stands for force.  Normally, when you try to move to a
         destination file that is not writeable, you are prompted
         as to whether or not to override this protection.  When
         the mv is forced, you are not prompted at all, and the
         file movement takes place.

     -i  stands for interactive mode. Whenever a move is to
         overwrite an existing file, the user is prompted on
         standard output by the name of the file followed by a
         question mark. If on standard input, the user answers
         with a line starting with 'y', the move continues. Any
         other reply prevents the move from occurring.

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

EXAMPLES
     The following example will move the file a.out to the
     directory bin.



          mv a.out bin


RETURN VALUE
     [NO_ERRS]      Command completed without error.

     [USAGE]        Incorrect command line syntax. Execution



Printed 10/17/86                                                1





MV(1)                   COMMAND REFERENCE                   MV(1)



                    terminated.

     [NP_WARN]      An error warranting a warning message
                    occurred. Execution continues.

     [P_WARN]       A system error occurred. Execution continues.
                    See intro(2) for more information on system
                    errors.

CAVEATS
     If file1 and file2 lie on different file systems, mv must
     copy the file and delete the original.  In this case the
     owner name becomes that of the copying process and any
     linking relationship with other files is lost.

     The -i option for mv is not the same as that for rm.

     When a directory is moved via a command like mv dir1 dir2 ,
     the destination directory must be empty or nonexistent.

     If the destination file is writeable but busy (being
     executed), mv will ask for the protection to be overridden.

SEE ALSO
     cp(1), ln(1).






























Printed 10/17/86                                                2





































































%%index%%
na:72,61;
sy:133,288;
de:421,764;
op:1185,895;
ex:2080,178;
rv:2258,194;2596,314;
ca:2910,690;
se:3600,109;
%%index%%000000000141

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026