mv command is used to move/rename files or directories. mv command is different from cp command. mv command completely removes the file from the source and moves to the directory specified, where cp command just copies the content from one file to another.
Use this command to move and rename file
mv [old filename] [new filename]
Moving a file to another directory
mv index.php games/index.php
Moving a file to another directory and renaming it at once
mv banner_new.jpg ads/banner_1.jpg
original file will be deleted as it was moved to another location, You can also move a folder
Moving “mysql” folder to “backup” folder
mv mysql/ backup