Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mv(1) — Duplix 5.0

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 [ options ] file1 file2

mv [ options ] file ... directory

DESCRIPTION

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

If file2 already exists, mv removes it before moving file1. If file2 has a mode which forbids writing, mv prints the mode and waits for a response from the user on the standard input.   (See chmod(2).)  If the user’s respone  begins with y, mv executes the move; if not, mv exits. 

In the second form listed in the SYNOPSIS, mv moves one or more files (plain files or directories) to the directory without altering their original filenames. 

Mv refuses to move a file onto itself. 

OPTIONS

− Interprets all the following arguments to mv as filenames.  This option lets the move or rename filenames that start with minus. 

−f Overrides any mode restrictions or the −i switch.  (Force.) 

−i Puts mv in interactive mode. Whenever a move is to supercede an existing file, mv prompts the user with the filename followed by a question mark. If the user answers with a line starting with ’y’, the move continues. Any other reply cancels the move. 

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. 

4th Berkeley Distribution  —  April 29, 1985

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