next up previous contents index
Next: Copying a File: Up: List of Simple Previous: Combining Files

Renaming a File: mv

  You can use the mv command to rename a file or to move it from one directory to another. To change the name of a file, enter a pair of commands like this:
 
               		  cat  new.file

cat: cannot open new.file

mv old.file new.file

or simply mv -i old.file new.file

The -i switch will warn you if the command would overwrite an existing file.

The mv command will change the file's name whether the new filename exists or not. The cat command makes sure that a file will not be replaced or lost.



Alan Silverman
Wed Apr 12 16:54:02 METDST 1995