Return to Snippet

Revision: 28896
at July 16, 2010 00:28 by beneberle


Initial Code
mv oldfile newfile

Initial URL


Initial Description
The result of this command is that there is no longer a file called "oldfile", but a new file called "newfile" contains what was previously in "oldfile".

Like cp, the mv command also overwrites existing files. For example, if you have two files, fourthfile and secondfile, and you type the command

    mv fourthfile secondfile 

mv will remove the original contents of secondfile and replace them with the contents of fourthfile. The effect is that fourthfile is renamed secondfile, but in the process secondfile is deleted.

Initial Title
UNIX: move/rename files

Initial Tags


Initial Language
Bash