Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mv(1) — Unisoft V7

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cp(1)

ln(1)

MV(1)  —  UNIX Programmer’s Manual

NAME

mv − move or rename files

SYNOPSIS

mv file1 file2

mv file ... directory

DESCRIPTION

Mv moves (changes the name of) file1 to file2.

You can only mv files that you own or for which you have write permission.  (see chmod(1) ). 

If file2 already exists, it is removed before file1 is moved.  If file2 exists and has a mode which forbids writing, mv prints the mode (see chmod(2)) and looks for a "y" from the standard input, which says "yes" to the move. This could be a "y" entered interactively or one at the beginning of the next line seen by the command interpreter. If no "y" is found, mv exits. 

if file2 does not exist, it is created for the move. 

In the second form, one or more files are moved to the named directory with their original file-names. 

Mv refuses to move a file onto itself. 

EXAMPLE

mv /a/unisoft/bin/file1 /b/clara/file2

removes file1 from the first directory and stores it as file2 in the second directory. 

SEE ALSO

cp(1), ln(1)

BUGS

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. 

7th Edition  —  1/25/82

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