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 | nothing |
Examples
Rename a file.
> mv before.txt after.txtMove a file into a directory.
> mv test.txt my/subdirectoryMove only if source file is newer than target file.
> mv -u new/test.txt old/Move many files into a directory.
> mv *.txt my/subdirectoryMove a file into the "my" directory two levels up in the directory tree.
> mv test.txt .../my/