commands
mv
Move or rename remote files.
Syntax
Section titled “Syntax”mv <remote-file>... <remote-target>Moves files and directories within the server, or renames them. The last argument is the destination:
- a directory with a trailing
/keeps the names; - a plain name renames a single file;
- an operation mask such as
*.oldrenames each file it is applied to.
A directory and a name or mask can be combined: /srv/archive/*.old. The
sources may contain masks. mv does not replace an existing file at the
destination.
Also available as rename.
Affected by
Section titled “Affected by”failonnomatch (see option).
Examples
Section titled “Examples”mv /var/www/html/index.html /var/www/html/index.oldmv /srv/incoming/*.csv /srv/processed/