How do I move or rename a file on my Linux / BSD / unix server?

mv - ‘mv’ is the *NIX equivalent of the DOS/Windows command ‘move’ and ‘ren’.
‘mv’ is short for ‘move’ which allows you to move or rename files to a
specific destination.


To move/rename a file or directory:


mv <fileordirectory> <destinationdirectoryorfilename>


examples:


mv examplefile /home/user/
mv examplefile examplefilerenamed
mv examplefile /home/user/examplefilerenamed
mv /path/to/examplefile /home/user/

Average: 3.8 (4 votes)