mv

mv - move or rename files


Rename a File or directory:

mv test.txt test_1.txt

Move file asking for confirmation before overwriting:

mv -i test.txt test_1.txt

Move multiple files to a specific directory:

mv /home/user01/pictures/* /home/user01/old_pictures/

Create a backup before overwriting:

mv -S .old file1.txt file2.txt

Move only the files that are newer than destination:

mv -u dir1/* dir2/

Move file overwriting destination without prompt:

mv -f file1.txt file2.txt

Move and display source and destination files:

mv -v file1.txt file2.txt