Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mv(C) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(S)

copy(C)

cp(C)

mvdir(ADM)


 mv(C)                           19 June 1992                           mv(C)


 Name

    mv - move or rename files and directories

 Syntax

    mv [ -f ] file1 file2

    mv [ -f ] directory1 directory2

    mv [ -f ] file ... directory

 Description

    In the first form, the mv command moves (changes the name of) file1 to
    file2 (or directory1 to directory2).

    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(C)) and
    prompts you for confirmation.  If you type ``y'', the move takes place;
    if not, mv exits.

    No questions are asked (if file2 is not writeable) when the -f option is
    given.

    In the second form, mv can only move directories within a filesystem, the
    target directory2 should not exist.

    In the third form, one or more files are moved to the directory, keeping
    their original filenames.

    mv refuses to move a file onto itself.

    mv does not follow symbolic links given as arguments.

 See also

    chmod(S), copy(C), cp(C), mvdir(ADM)

 Notes

    If file1 and file2 lie on different filesystems, 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.

 Standards conformance

    mv is conformant with:

    AT&T SVID Issue 2;
    and X/Open Portability Guide, Issue 3, 1989.


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