mv
FilesBeginner In simulator In real LinuxMove or rename files
Name: mv = move
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
mv moves or renames files and directories. Within one file system it only changes directory entries, so it is instant regardless of size; across file systems it copies the data and then removes the original.
An existing destination is overwritten by default; -i asks first and -n never overwrites.
Syntax
mv [OPTION]... SOURCE... DESTCommon options
| -i / --interactive | Ask before overwriting |
| -f / --force | Never ask before overwriting |
| -n / --no-clobber | Never overwrite existing files |
| -u / --update | Move only when the source is newer or the destination is missing |
| -v / --verbose | Explain what is being done |
| -b / --backup | Back up a file before overwriting it, as name~ |
| -t / --target-directory DIR | Move everything into DIR (the destination first, handy with xargs) |
| -T / --no-target-directory | Treat the destination as a plain name even if it is a directory (for renaming) |