MV(1)
π mv β the manual, but make it bestie π
okay so this is mv(1), the move command, and honestly? she's a whole icon. she's part of the General Commands Manual crowd and she is about to relocate your files with main character energy. no cap. let's get into it π«Ά
β¨ NAME β¨
mv β move SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY. that's it. that's the girl. π
π¦ SYNOPSIS π¦
mv [OPTION]... [-T] SOURCE DEST
mv [OPTION]... SOURCE... DIRECTORY
mv [OPTION]... -t DIRECTORY SOURCE...
three ways to serve, pick your fave π
πΈ DESCRIPTION πΈ
Move SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY. literally. that's what she does and she does it flawlessly. β¨
π OPTIONS π
-f,--forceβ do not prompt before overwriting. she's confident, she's decisive, she ate π₯-i,--interactiveβ prompt before override. she's gonna ask first, consent is key bestie π-n,--no-clobberβ do not overwrite an existing file. existing files are safe, protected, untouched π--strip-trailing-slashesβ remove any trailing slashes from each SOURCE argument. bye bye extra/π§--backup[=<CONTROL>]β make a backup of each existing destination file. archival queen behavior π-bβ like--backupbut does not accept an argument-S,--suffix <SUFFIX>β override the usual backup suffix--updateβ move only when the SOURCE file is newer than the destination file or when the destination file is missing
Possible values:
nonealloldernone-fail
-uβ like--updatebut does not accept an argument-t,--target-directory <DIRECTORY>β move all SOURCE arguments into DIRECTORY-T,--no-target-directoryβ treat DEST as a normal file-v,--verboseβ explain what is being done. she's narrating her own life and honestly? we're watching π-g,--progressβ Display a progress bar. Note: this feature is not supported by GNU coreutils. β οΈ-Zβ set SELinux security context of destination file to default type--context[=<CTX>]β like-Z, or if CTX is specified then set the SELinux security context to CTX--debugβ explain how a file is copied. Implies-v--exchangeβ exchange source and destination (atomically swap them). the swap!! the drama!! π₯-h,--helpβ Print help-V,--versionβ Print version<files>
π EXTRA π
When specifying more than one of -i, -f, -n, only the final one will take effect. so don't be out here stacking them thinking they all count, bestie β last one wins, periodt π
Do not move a non-directory that has an existing destination with the same or newer modification timestamp; instead, silently skip the file without failing. If the move is across file system boundaries, the comparison is to the source timestamp truncated to the resolutions of the destination file system and of the system calls used to update timestamps; this avoids duplicate work if several mv -u commands are executed with the same source and destination. This option is ignored if the -n or --no-clobber option is also specified. which gives more control over which existing files in the destination are replaced, and its value can be one of the following:
- all β This is the default operation when an
--updateoption is not specified, and results in all existing files in the destination being replaced. - none β This is similar to the
--no-clobberoption, in that no files in the destination are replaced, but also skipping a file does not induce a failure. - older β This is the default operation when
--updateis specified, and results in files being replaced if they're older than the corresponding source file.
The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX. The version control method may be selected via the --backup option or through the VERSION_CONTROL environment variable. Here are the values:
none, off never make backups (even if --backup is given)
numbered, t make numbered backups
existing, nil numbered if numbered backups exist, simple otherwise
simple, never always make simple backups
no cap, those are the exact values, don't improvise π«Ά
β VERSION β
v(uutils coreutils) 0.12.0
π EXAMPLES π
Rename a file or directory when the target is not an existing directory:
mv path/to/source path/to/target
Move a file or directory into an existing directory:
mv path/to/source path/to/existing_directory
Move multiple files into an existing directory, keeping the filenames unchanged:
mv path/to/source1 path/to/source2 ... path/to/existing_directory
Do not prompt for confirmation before overwriting existing files:
mv [-f|--force] path/to/source path/to/target
Prompt for confirmation interactively before overwriting existing files, regardless of file permissions:
mv [-i|--interactive] path/to/source path/to/target
Do not overwrite existing files at the target:
mv [-n|--no-clobber] path/to/source path/to/target
Move files in verbose mode, showing files after they are moved:
mv [-v|--verbose] path/to/source path/to/target
Specify target directory so that you can use external tools to gather movable files:
find /var/log -type f -name '*.log' -print0 | xargs -0 mv
[-t|--target-directory] path/to/target_directory
The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail. π (it's giving work-in-progress, but we move)
π that's the whole page bestie. go forth and relocate files with confidence. iykyk. π
this lil masterpiece dropped 2026-09-25 and lives under v(uutils coreutils) 0.12.0 β uutils coreutils, general commands manual, serving absolute looks since forever β¨π
π
π¦ where this page comes from
- ubuntu stonking: rust-coreutils 0.12.0-1ubuntu2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms