Solaris Advanced User's Guide

Moving and Renaming Files (mv)

You can move and rename files by using the same command, mv (move). In this example, use the mv command to rename tempfile to emptyfile:


$ mv tempfile emptyfile
$ 

Then list both files again to verify the change.


$ ls *file
copyfile    emptyfile

tempfile is replaced by emptyfile.

For more information on moving and renaming files, see the man page mv(1).