What does mv do?

move or rename files and directories.

▸ Explain your own mv command →

mv examples, explained

$ mv -i old new

  • mvmove or rename files and directories
  • -iprompt before overwriting
  • oldan argument passed to the command
  • newan argument passed to the command

$ mv -v a b

  • mvmove or rename files and directories
  • -vverbose — print each file as it is moved
  • aan argument passed to the command
  • ban argument passed to the command

mv flags & options

-fforce — overwrite the destination without prompting
-iprompt before overwriting
-nnever overwrite an existing file
-vverbose — print each file as it is moved

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.