Mv

mv is a command line program for moving files from one location to another.

[edit] Examples

Let's say we are in a directory with directories dir1 and dir2 and files file1 and file2.

mv file1 file3

file1 is now file3.

mv file2 dir1

file2 is now in dir1, but it is still named file2.

mv file3 dir2/file1

file3 is now located in dir2, and it is also named file1 again. If we want to move file1 back into our current directory, we can use:

mv dir2/files1 files1

or simpler

mv dir2/files1 .

Because . stands for the current directory.

XHTML 1.1 CSS 2 Sec 508