Skip to content
linscpSecure file transfer for Linux and Windows
GitHub

commands

cp

Copy files to another place on the same server.

Generated from linscp 0.6.1
cp <remote-file>... <remote-target>

Duplicates files on the server without downloading them. The last argument says where the copies go:

  • a directory, written with a trailing / (/srv/backup/), keeps the names;
  • a plain name (index.old) gives a single copy that name;
  • an operation mask (*.bak) renames each copy. See operation masks.

You can combine a directory with a name or mask: /srv/backup/*.bak. The sources may contain masks too. cp does not replace a file that already exists at the target.

The server must support copying: SFTP servers with the copy extension, or any server where linscp can open a shell.

failonnomatch (see option).

Terminal window
cp /var/www/html/index.html /var/www/html/index.html.orig
cp /etc/nginx/*.conf /home/alice/nginx-backup/