Linux MV Command

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,

Syntax

$mv [file_name] [destination_path]

Move a File


$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.

Share Share on Facebook Share on Twitter Share on Google+ Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit