>_ linuxcommand.dev
File Operations

mv

Moves or renames files/directories. Can also be used to move between filesystems.

Ubuntu CentOS Debian Arch SUSE Slackware Fedora
Verified: 2025-09-09
Syntax
$mv [OPTIONS] SOURCE DEST
Optionen
-i, --interactive Ask before overwriting
-v, --verbose Show moved files
-f, --force Force move without prompt
-u, --move Move only newer files
-t, --target-directory Target as first argument
Examples
$mv file.txt new_name.txt
$mv folder/ /new/path/
$mv -i important_file.txt target/
$mv -v *.log /var/log/archive/
$mv file1.txt file2.txt file3.txt /target/
Typical use cases
?
Standard usage
mv --help
Note Can be used for both renaming and moving. More efficient than cp + rm as no duplicates are created.
Export