mv - change file or directory name


mv name1 [ name2 ... ] target


If name and target are both file names, file name is renamed target , removing any existing file named target. File names can be up to 12 characters long.

If name and target are both directory names, directory name is renamed target if target does not already exist. Directory names can be up to 10 characters long.

If target is a directory, then one or more files move to that directory destroying any files in the new directory with the same name.


Change the name of file a to b
mv a b
Move files x, y, z from directory /tmp to /bin.
mv /tmp/x /tmp/y /tmp/z /bin
Change the name of directory /sss to /ttt.
mv /sss /ttt


cp(1F) , rm(1F)