Modular Computers the manual GitHub

mv

mv: move or rename files.

Synopsis

mv from to
mv from… directory

Description

mv renames from to to. If the last operand is a directory, each from is moved into it, keeping its name; with more than two operands, the last must be a directory.

Files and directories (with everything in them) can be moved. Across filesystems (between disks, or to /tmp), mv copies, then removes the original; symbolic links are copied as links.

Exit status

0 if everything was moved; 1 on too few operands, a last operand that is not a directory when it must be, or if anything could not be moved.

Notes

There are no options: every word is a file name.

See also

cp(1), rm(1), ln(1)