mv

>Usage

The mv command is used to move files and folders from the current directory to another, or to rename a file or folder.

>Synopsis

mv [option] [file-name] [directory-name]
mv [file-name] [file-new-name]

Example: mv used to rename a file

Dots

> mv as_above.txt so_below.txt


>ls
so_below.txt

>Options

-n

With this option, if a file in the destination folder has the same name, it won't be overwritten when moving the file.

-i

Asks for a confirmation before copying the files, pressing y will confirm the action and n will negate.

-f

Overwrites the existing files with the same name, does not ask for confirmation.

>Quiz

Progress: Question ? out of ?

Question Title

Page written by Andrea Lepori