Moving and Renaming Files and Folders

Description

How to move and rename files and directories using the command line

Syntax
mv oldname.txt newname.txt Rename file from oldname.txt to newname.txt
mv oldfolder/ newfolder Rename folder from oldfolder to newfolder
mv newfolder/* . Move everything from newfolder to current working directory
mv file* newfolder/ Move all files starting with 'file' to newfolder
mv newfolder/ ~/Documents/ Move the entire 'newfolder' folder into the Documents folder in our home directory
mv ~/Documents/newfolder ./jackpot Move 'Documemnts/newfolder' folder inside 'jackpot' folder and rename at the same time
Examples