A Quick Introduction to Unix/Moving Files

From Wikibooks, open books for an open world
Jump to: navigation, search

Moving files[edit]

mv (move)[edit]

Suppose that you want to rename a file. In Unix, we talk about moving the file and the command that does it is mv. For example

mv file1 file2 

moves (or renames) file1 to file2.

This differs from copying the file: you end up with only one file rather than two.

You can move files across directories by specifying the pathname just as you can for the cp or copy command.