mv
moves and renames files and directories
TLDR
SYNOPSIS
mv [options] source... destination
DESCRIPTION
mv moves and renames files and directories. When the source and destination are on the same filesystem, it performs an atomic rename. When moving across filesystems, it copies the data and then removes the original.Renaming is simply moving a file within the same directory. Moving a file into a directory places it inside that directory with the same basename.If multiple sources are given, the last argument must be a directory and all sources are moved into it.
PARAMETERS
-i, --interactive
Prompt before overwriting an existing file.-f, --force
Do not prompt before overwriting. Overrides -i and -n.-n, --no-clobber
Do not overwrite an existing file. Overrides -i and -f.-v, --verbose
Print the name of each file being moved.-u, --update
Move only when the source is newer than the destination or the destination does not exist.--backup[=CONTROL]
Make a backup of each existing destination file. CONTROL can be numbered, existing, simple, or none.-S, --suffix SUFFIX
Override the usual backup suffix (default ~).-t, --target-directory DIRECTORY
Move all sources into the specified directory.-T, --no-target-directory
Treat destination as a normal file, not a directory.
CAVEATS
mv overwrites existing destination files by default without warning. Use -i or -n to prevent accidental data loss. When moving across filesystems, the operation is not atomic: the file is copied first, then the original is deleted.
HISTORY
mv is one of the original Unix commands, present since Version 1 AT&T Unix in 1971.
