mv command is used to move file from one location to another location using mv command in linux.another use of mv command is to rename a specified file name in linux,
$mv [file_name] [destination_path]
$mv file1.txt demodir
Rename a File
$mv file1.txt file2.txt
Options
Sr.No |
Options |
Descriptions |
---|---|---|
01 |
-b |
make a backup copy is renamed with file1.txt |
02 |
-f |
remove existing destination file without prompting for confirmation. |
03 |
-help |
display available option. |
04 |
-i |
prompt before overwriting existing destination file. |
05 |
-v |
show messages explaining what the command is doing. |