Skip to content
linscpSecure file transfer for Linux and Windows
GitHub

commands

put

Upload files to the server.

Generated from linscp 0.6.1
put [switches] <local-file>... [<remote-target>]

Copies local files and directories to the server. Directories are copied with everything they contain.

With a single argument, the file goes to the remote working directory (see cd). With more, the last argument is the target:

  • end it with / to name a directory: /var/www/html/;
  • otherwise its last part is the new name, or an operation mask such as *.bak.

Use ./ as the target to upload several files into the remote working directory. Wildcards in local source names follow the local file system, so they are case-sensitive on Linux. With /stdin, a source of - uploads standard input to the single file named by the target.

Also available as send, mput.

Switch What it does
-delete Remove each local file once it has been uploaded, which turns the copy into a move.
-resume Continue an interrupted upload where it stopped (SFTP and FTP).
-append Add the uploaded data to the end of an existing remote file (SFTP).
-preservetime[=all] Give remote files the modification time of the local ones. With =all, directories keep theirs too.
-nopreservetime Let uploaded files get the current time.
-permissions=<mode> Give uploaded files these octal permissions, such as 644.
-nopermissions Let the server choose the permissions of uploaded files.
-speed=<KB/s> Cap the upload rate in kilobytes per second.
-transfer=<mode> Use binary, ascii (convert line endings) or automatic mode.
-filemask=<mask> Select which files and subdirectories to upload with an include and exclude mask.
-resumesupport=<on/off/KB> Upload to a temporary file first, always (on), never (off), or for files larger than the number of KB given.
-neweronly Skip files whose remote copy is the same age or newer.
-latest Upload only the most recently modified of the matching files.

confirm, failonnomatch, reconnecttime (see option).

Publish a page with fixed permissions.

Terminal window
put -permissions=644 /home/alice/site/index.html /var/www/html/

Upload a directory tree, leaving out temporary files and Git data.

Terminal window
put -filemask="|*.tmp; .git/" /home/alice/site/ /var/www/html/

Stream a database dump straight to the server (needs /stdin).

Terminal window
put - /srv/backups/db.sql