1. Computing
Send to a Friend via Email

Discuss in my forum

Example uses of the Linux Command "mv"

An Introductory Tutorial

By

The "mv" command is commonly used for renaming a file and/or moving a file to another directory (folder).

To rename the file "titles.txt" in the current directory to "music_collection.txt" you would type

 mv titles.txt music_collection.txt 
To move the file "students.txt" from the current directory to the directory "/school" you can enter
 mv students.txt school/. 
The "." at the end means: place here without renaming. If you want to move and rename a file a file at the same time you would type:
 mv students.txt school/2nd_grade.txt 

©2014 About.com. All rights reserved.