Move/rename files and directories
mv --backup {backup} -b {flag-b} -f {force} -i {interactive} -n {no-clobber} ๐ backup ๐ flag-b ๐ force ๐ interactive ๐ no-clobber mv --backup {backup} -b {flag-b} -f {force} -i {interactive} -n {no-clobber} Sandbox: execFile · Timeout: 30s
system.file.mv system.file.search system.file.process system.file.copy system.file.move system.file.delete | Name | Type | Required | Default | Description | Aliases |
|---|---|---|---|---|---|
backup | string | No | - | make a backup of each existing destination file | --backup |
flag-b | string | No | - | like --backup but does not accept an argument --debug explain how a file is copied. Implies -v --exchange exchange source and destination | -b |
force | string | No | - | do not prompt before overwriting | -f, --force |
interactive | string | No | - | prompt before overwrite | -i, --interactive |
no-clobber | string | No | - | do not overwrite an existing file | -n, --no-clobber |
no-copy | string | No | - | do not copy if renaming fails --strip-trailing-slashes remove any trailing slashes from each SOURCE argument | --no-copy |
suffix | string | No | - | override the usual backup suffix | -S, --suffix |
target-directory | file | No | - | move all SOURCE arguments into DIRECTORY | -t, --target-directory |
no-target-directory | string | No | - | treat DEST as a normal file --update[=UPDATE] control which existing files are updated; UPDATE={all,none,none-fail,older(default)} | -T, --no-target-directory |
flag-u | string | No | - | equivalent to --update[=older]. See below | -u |
verbose | string | No | - | explain what is being done | -v, --verbose |
context | file | No | - | set SELinux security context of destination file to default type --help display this help and exit --version output version information and exit | -Z, --context |
exchange | boolean | No | - | --exchange | |
help | boolean | No | - | --help | |
strip_trailing_slashes | boolean | No | - | --strip-trailing-slashes | |
version | boolean | No | - | --version |
Basic usage with backup
mv ${backup} Display help message
mv --help mv is a command-line utility for move/rename files and directories.
mv --backup {backup} -b {flag-b} -f {force} -i {interactive} -n {no-clobber}