Linux mv command

mv command is used to move or rename files and directories. [Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY]

Syntax:

mv [OPTION]… [-T] SOURCE DEST
mv [OPTION]… SOURCE… DIRECTORY
mv [OPTION]… -t DIRECTORY SOURCE…

Examples:

Rename the file by specifying the file name and new name of the file.

mv Server_name_010101 Server_name_010101_backup.bak

Move Server_name_010101_backup.bak to the backup directly

mv Server_name_010101_backup.bak backup

Options:
Linux mv command

Powered by k2schools
Skip to toolbar