mv—moves or renames files

mv [options] source dest
mv [options] source… directory
Options:
[-bfiuv] [-S  backup-suffix] [-V {numbered,existing,simple}]
[--backup] [--force] [--interactive] [--update] [--verbose]
[--suffix=backup-suffix]
[--version-control={numbered,existing,simple}] [--help][--version]

The mv command moves a source filename to a target filename. The filename and the target may not have the same name. If target is not a directory, only one file may be specified before it; if it is a directory, more than one file may be specified. If target does not exist, mv creates a file named target. If target exists and is not a directory, its contents are overwritten. If target is a directory, the file(s) are moved to that directory.

Get Linux Shells by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.