[Next] [Previous] [Up] [Top] [Contents]

3.7 File Maintenance Commands

3.7.2 mv - move a file

Rename a file with the move command, mv.

Syntax

mv [options] old_filename new_filename

Common Options

-i interactive (prompt and wait for confirmation before proceeding)

-f don't prompt, even when copying over an existing target file (overrides -i)

Examples

% mv old_filename new_filename

You now have a file called new_filename and the file old_filename is gone. Actually all you've done is to update the directory table entry to give the file a new name. The contents of the file remain where they were.


Introduction to Unix - 14 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]