Developer's Daily Unix by Example
  main | java | perl | unix | DevDirectory
   
Main
Unix
Education
Unix by Example
   

 

Command mv
Description The "mv" command is used to move and rename files.
Examples mv Chapter1 Chapter1.bad

This command renames the file "Chapter1" to the new name "Chapter1.bad".

mv Chapter1 garbage

This command renames the file "Chapter1" to the new name "garbage". (Notice that if "garbage" is a directory, "Chapter1" would be moved into that directory).

mv Chapter1 /tmp

This command moves the file "Chapter1" into the directory named "/tmp".

mv tmp tmp.old

Assuming in this case that tmp is a directory, this example renames the directory tmp to the new name tmp.old.

 


What's related

copyright 1998-2007, devdaily.com, all rights reserved.
devdaily.com, an alvin j. alexander production.