Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mv(1) — UTek 3.0

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.

     The mv command refuses to move a file onto itself.

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

     -i 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.

     -  Interpret all the following arguments to mv as file
        names; this allows file names starting with a minus sign.

EXAMPLES
     The following example moves 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
                    terminated.

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




Printed 5/12/88                                                 1





MV(1)                   COMMAND REFERENCE                   MV(1)



     [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(1).

     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 asks for the protection to be overridden.

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



































Printed 5/12/88                                                 2





































































%%index%%
na:192,77;
sy:269,375;
de:644,842;
op:1486,898;
ex:2384,203;
rv:2587,381;3232,171;
ca:3403,730;
se:4133,146;
%%index%%000000000142

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