Here is the video version, if you prefer it:
mv command is used to move or rename files or directories, depending on its usage. (Shotts, 2019) To rename or move files or directories, use it like this:
mv oldFileName newFileName
If you want to move one or more files from the source directory to the destination directory, use:
mv file1 file2 … desination
A couple of remarks: Use the
-i option to prevent the
mv command from silently overwriting files (files are overwritten when they have the same name in both the source and the destination) and use the
-u option only move files that either don’t exist or are newer than the corresponding files in the destination directory.
Hope you learned something useful!
Shotts, W. (2019). The Linux Command Line, Fifth Internet Edition. Retrieved from http://linuxcommand.org/tlcl.php. Pages 54-55
Subscribe to my newsletter to keep abreast of the interesting things I'm doing. I will send you the newsletter only when there is something interesting. This means 0% spam, 100% interesting content.