mv
Move or rename files and directories.
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
Examples
$mv file.txt new_name.txt
Examples
$mv folder/ /new/path/
Examples
$mv -i important_file.txt target/
Examples
$mv -v *.log /var/log/archive/
Examples
$mv file1.txt file2.txt file3.txt /target/
Shortcuts
mv * /target/ (moves all files)
mv old_name new_name (rename)
Typical use cases
cp file.txt file.bak
cp -r folder/ target/
mv old.txt new.txt
Note
Renames within the same filesystem; moving across devices may require a copy and delete.
Export