MV(1)

πŸ“¦
version 9.10 Β· 5 versions
, in ubuntu stonking

πŸ¦‹ MV(1) β€” aka the mv glow-up πŸ’…

okay bestie, you're in the User Commands corner of the manual, and today's main character is mv, the move-and-rename icon. she's been on every Unix system forever, she's lowkey carrying your entire filesystem organization era, and she has ✨opinions✨ about overwriting your stuff. let's go. πŸŽ€


🌸 NAME 🌸

mv β€” move (rename) files. that's it. that's the vibe. fr fr.


✨ SYNOPSIS ✨

mv [OPTION]... [-T] SOURCE DEST
mv [OPTION]... SOURCE... DIRECTORY
mv [OPTION]... -t DIRECTORY SOURCE...

three whole forms, pick your fighter πŸ’–


πŸ”₯ DESCRIPTION πŸ”₯

Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY. simple on the surface, deeply unhinged under the hood, we love her.

Also, PSA from the manual itself: mandatory arguments to long options are mandatory for short options too. so like, don't skip the argument just because the short flag looks smol. she will not be flexible about this. periodt.


πŸ‘‘ the flags, one by one, no skips, we said what we said πŸ‘‘

  • --backup[=CONTROL] β€” make a backup of each existing destination file. safety era activated 🫢
  • -b β€” like --backup but does not accept an argument. yes she's the low-maintenance sister of the two.
  • --debug β€” explain how a file is copied. Implies -v. she will narrate her own actions like it's a get-ready-with-me 🌈
  • --exchange β€” exchange source and destination. the two files swap lives. iconic behavior honestly.
  • -f, --force β€” do not prompt before overwriting. zero hesitation. full send. πŸ’€
  • -i, --interactive β€” prompt before overwrite. she's asking permission, she's respectful, she's a green flag 🌸
  • -n, --no-clobber β€” do not overwrite an existing file. absolutely not. the existing file stays untouched, no notes.
  • the chaotic one: if you specify more than one of -i, -f, -n, only the final one takes effect. so whichever you typed last wins the vibe check. don't be messy about it bestie 😭
  • --no-copy β€” do not copy if renaming fails. no fallback, no plan B, we move or we don't.
  • --strip-trailing-slashes β€” remove any trailing slashes from each SOURCE argument. spring cleaning for your paths 🧹
  • -S, --suffix=SUFFIX β€” override the usual backup suffix.
  • -t, --target-directory=DIRECTORY β€” move all SOURCE arguments into DIRECTORY. herding them all home in one go πŸ‘
  • -T, --no-target-directory β€” treat DEST as a normal file. no folder fantasy here.
  • --update[=UPDATE] β€” control which existing files are updated; UPDATE={all,none,none-fail,older(default)}. the whole menu, chef's kiss.
  • -u β€” equivalent to --update[=older]. See below. (and when I say see below, I literally mean the next paragraph, she means it.)
  • -v, --verbose β€” explain what is being done. commentary track ON πŸŽ™οΈ
  • -Z, --context β€” set SELinux security context of destination file to default type. security girlies rise πŸ’œ
  • --help β€” display this help and exit. classic.
  • --version β€” output version information and exit. she'll tell you who she is.

🌈 UPDATE β€” the whole lore, explained 🌈

UPDATE controls which existing files in the destination are replaced. here's the breakdown, no gatekeeping:

  • 'all' is the default operation when an --update option is not specified, and results in all existing files in the destination being replaced. yeah. everything. the default is the bold choice, welcome to Unix πŸ’…
  • 'none' is like the --no-clobber option, in that no files in the destination are replaced, and skipped files do not induce a failure. peaceful. no drama.
  • 'none-fail' also ensures no files are replaced in the destination, but any skipped files are diagnosed and induce a failure. so she protects your files AND yells about it 😀
  • 'older' is the default operation when --update is specified, and results in files being replaced if they're older than the corresponding source file. age-gap logic but for file timestamps.

πŸŽ€ backups + the suffix situation πŸŽ€

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). living dangerously, we respect the commitment.
  • numbered, t β€” make numbered backups. collect them all, file.~1~ era.
  • existing, nil β€” numbered if numbered backups exist, simple otherwise. she reads the room first.
  • simple, never β€” always make simple backups. consistent queen πŸ‘‘

πŸ’œ AUTHOR πŸ’œ

Written by Mike Parker, David MacKenzie, and Jim Meyering. legends, all three, no cap 🌟


πŸ™ˆ REPORTING BUGS πŸ™ˆ

(if something's broken, tell them, they genuinely want to know, it's giving collaborative 🫢)


🌸 SEE ALSO 🌸

  • rename(2)
  • Full documentation https://www.gnu.org/software/coreutils/mv
  • or available locally via: info '(coreutils) mv invocation'
  • Packaged by Ubuntu (9.10-1ubuntu2)
  • Copyright Β© 2026 Free Software Foundation, Inc.
  • License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html.
  • This is free software: you are free to change and redistribute it.
  • There is NO WARRANTY, to the extent permitted by law.
⚠️ bestie, note the NO WARRANTY line for real. she's free software, you can change her and share her, but if something goes sideways that's on you, not on her. read that part twice, not just the fun parts. πŸ’€

and that's the whole page. this one shipped as GNU coreutils 9.10, dated August 2026 β€” so yeah, she's current, she's maintained, she's thriving. go move some files, bestie, and maybe back them up first πŸ’–βœ¨

πŸ“¦ where this page comes from