mv for filesystem
Move files or directories using uutils/coreutils mv.
Signature
> mv {flags} ...rest
Flags
-
--force, -f: Do not prompt before overwriting. -
--verbose, -v: Explain what is being done. -
--progress, -p: Display a progress bar. -
--interactive, -i: Prompt before overwriting. -
--update, -u: Move and overwrite only when the SOURCE file is newer than the destination file or when the destination file is missing. -
--no-clobber, -n: Do not overwrite an existing file. -
--all, -a: Move hidden files if '*' is provided.
Parameters
-
...rest: Rename SRC to DST, or move SRC to DIR.
Input/output types:
| input | output |
|---|---|
| nothing | table<source: string, destination: string, message: string> |
| nothing | nothing |
Examples
Rename a file.
> mv before.txt after.txt
Move a file into a directory.
> mv test.txt my/subdirectory
Move only if source file is newer than target file.
> mv -u new/test.txt old/
Move many files into a directory.
> mv *.txt my/subdirectory
Move a file into the "my" directory two levels up in the directory tree.
> mv test.txt .../my/
Move a file and show what is being done.
> mv -v before.txt after.txt ╭───┬────────────┬─────────────┬──────────╮ │ # │ source │ destination │ message │ ├───┼────────────┼─────────────┼──────────┤ │ 0 │ before.txt │ after.txt │ renamed │ ╰───┴────────────┴─────────────┴──────────╯
Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/mv.html