Move and renaming files and folders in the terminal
Moving files and folders
To move a file or folder in the terminal, you use the mv command and pass the file/folder you want to move as well as the destination as arguments:
mv file-or-folder folder-destination
Renaming files and folders
For renaming, you use the mv command as well. The only difference is that you replace the destination with the new name for the file/folder.
mv file-or-folder new-file-or-folder-name
Moving and renaming at the same time
You can also move and rename a file/folder at the same time:
mv file-or-folder folder-destination/new-file-or-folder-name