sftpc - Bitvise SSH Client command-line SFTP client Session help for version 9.42 If you are using a newer version, consult the latest help in sftpc itself. For help with command line parameters, run: sftpc -? sftpc -? | more For help with session commands, run: sftpc -help-shell sftpc -help-shell Alternately - you can also connect to a server interactively, then run: help help ------------------------------------------------------------------------------ sftpc -help-shell Available commands: mkdir, md Create remote directory lmkdir, lmd Create local directory rmdir, rd Remove remote directory lrmdir, lrd Remove local directory cd Change remote directory lcd Change local directory pwd Print remote working directory lpwd Print local working directory dir, ls Display remote directory listing ldir, lls Display local directory listing type View or set the file transfer mode get Download file put Upload file queue Manage background transfer queue move, mv Move remote file lmove, lmv Move local file copy, cp Copy remote file lcopy, lcp Copy local file del, rm Delete remote file ldel, lrm Delete local file symlink Create symbolic link ln Create link chmod Change permissions of file chown Change owner of file chgrp Change group of file attrib Display or change file attributes sha512sum Calculate SHA-512 digests of remote files sha256sum Calculate SHA-256 digests of remote files sha1sum Calculate SHA-1 digests of remote files md5sum Calculate MD5 digests of remote files lsha512sum Calculate SHA-512 digests of local files lsha256sum Calculate SHA-256 digests of local files lsha1sum Calculate SHA-1 digests of local files lmd5sum Calculate MD5 digests of local files df Report free disk space on remote directory exec Execute 'command' on the server !command Execute 'command' in local shell ! Launch local shell wait Wait for outstanding file close confirmations version, ver Show sftpc and protocol version help, ? Display sftpc usage information exit, quit Exit SFTP client Run 'sftpc -help-shell [-]' for help about a particular command. ------------------------------------------------------------------------------ USAGE: mkdir remote-path DESCRIPTION: Create remote directory. SYNONYM: md ------------------------------------------------------------------------------ USAGE: lmkdir local-path DESCRIPTION: Create local directory. SYNONYM: lmd ------------------------------------------------------------------------------ USAGE: rmdir [remote-path] DESCRIPTION: Remove the specified remote directory. To remove whole directory trees, use 'del -s'. PARAMETERS: -ifExist If the path does not exist, command succeeds without deleting. SYNONYM: rd ------------------------------------------------------------------------------ USAGE: lrmdir [local-path] DESCRIPTION: Remove local directory. PARAMETERS: -ifExist If the path does not exist, command succeeds without deleting. SYNONYM: lrd ------------------------------------------------------------------------------ USAGE: cd [remote-path] DESCRIPTION: Change remote directory to 'remote-path' or home directory. ------------------------------------------------------------------------------ USAGE: lcd local-path DESCRIPTION: Change local directory to 'local-path'. ------------------------------------------------------------------------------ USAGE: pwd DESCRIPTION: Display remote working directory. ------------------------------------------------------------------------------ USAGE: lpwd DESCRIPTION: Display local working directory. ------------------------------------------------------------------------------ USAGE: dir [remote-path] [-s] [-lit] DESCRIPTION: Display remote directory listing. PARAMETERS: -s Include subdirectories (recursive). -lit Treat remote-path literally (not a wildcard pattern). SYNONYM: ls ------------------------------------------------------------------------------ USAGE: ldir [local-path] DESCRIPTION: Display local directory listing. SYNONYM: lls ------------------------------------------------------------------------------ USAGE: type [b | lf | std | tlf | t] DESCRIPTION: View or set the file transfer mode. PARAMETERS: b Set binary as the file transfer mode. All files are transferred without conversion. Best for use with Windows servers. Selected by default when connected to Bitvise SSH Server (WinSSHD) or another server recognized as a Windows server. lf Set auto detection as the file transfer mode. If a text file is detected, it is transferred with client-side conversion. When uploading, any CRLF bytes are replaced with LF. When downloading, any LF byte is replaced with CRLF. Binary files are unaffected. std Set auto detection as the file transfer mode. When downloading, text files are converted on the client side if necessary. When uploading, text files are transferred using the SFTP v4 text file mechanism. Binary files are unaffected. Selected by default when not connected to a server recognized as a Windows server. tlf Set textual as the file transfer mode. All files are transferred with conversion. When uploading, any CRLF bytes are replaced with LF. When downloading, any LF byte is replaced with CRLF. t Set textual as the file transfer mode. All files are treated as text files and transferred using the SFTP v4 text file mechanism. To be used only when other transfer modes fail, e.g. when a file MUST be downloaded with the SFTP v4 text mode flag. NOTES: - 'std' and 't' transfer mode options are not available when SFTP version 3 or lower is in use. ------------------------------------------------------------------------------ USAGE: get remote-path [local-path] [-bg | -fg] [-s] [-o] [-r|-rv] [-del] [-wait] [-f] [-noTime] [-mustSetTime] [-lit] [-mirror [-erase]] [-fastSkip] [-noBuf[=y|n]] [-noSync] [-b | -lf | -std | -tlf | -t] DESCRIPTION: Download file. PARAMETERS: -bg Start (queue) download in background. -fg Start download in foreground. -s Include subdirectories (recursive). -r Resume existing incomplete files using synchronization if available, or heuristic resume. Heuristic resume MAY result in an inconsistent destination file if its content has changed in the middle. -rv Resume, but only in a verifiable manner. Heuristic resume disabled. This requires the server to support block-based synchronization. -o Overwrite or synchronize existing files. If -r is also specified, and synchronization is unavailable, heuristic resume is tried first. -del Remove remote file after successful download. -wait Wait for file close confirmation before completing the download. If used with -del, wait for file close confirmation before deleting. -f Assume remote-path is a file (not a directory). -noTime Do not synchronize file modification times. -mustSetTime Time synchronization must succeed, or the command fails. -lit Treat remote-path literally (not a wildcard pattern). -mirror Mirror remote-path to local-path. Remote files that do not exist locally will be downloaded. Local files that are different than their remote versions will be overwritten. -erase With -mirror, erase local files that are not present remotely. -fastSkip Skip files where local and remote file size and last write time are equal. This can dramatically speed up transfers with many files, at the cost of not checking if file content is actually identical. Ineffective if server omits file size/time in directory listings. -noBuf Whether the server should open file(s) with FILE_FLAG_NO_BUFFERING. Local files are still opened normally. No value means yes. -noSync When the destination file already exists, do not synchronize content using hashing, even if the server supports 'check-file-blocks'. FILE TRANSFER MODE - if present, overrides mode selected with "type": -b Download files as binary; no conversions. -lf Auto-detect text files. In text files, replace LF with CRLF. Binary files are unaffected. -std Behaves same as -lf when downloading. Not available when SFTP version 3 or lower is in use. -tlf Download all files as textual. Replace all LF bytes with CRLF. -t Download all files using the SFTP v4 text file transfer mechanism. Not available when SFTP version 3 or lower is in use. ------------------------------------------------------------------------------ USAGE: put local-path [remote-path] [-bg | -fg] [-s] [-o] [-r|-rv] [-del] [-wait] [-f] [-noTime] [-mustSetTime] [-m=mode] [-dm=mode] [-mirror [-erase]] [-fastSkip] [-noBuf[=y|n]] [-noSync] [-b | -lf | -std | -tlf | -t] DESCRIPTION: Upload file. PARAMETERS: -bg Start (queue) upload in background. -fg Start upload in foreground. -s Include subdirectories (recursive). -r Resume existing incomplete files using synchronization if available, or heuristic resume. Heuristic resume MAY result in an inconsistent destination file if its content has changed in the middle. -rv Resume, but only in a verifiable manner. Heuristic resume disabled. This requires the server to support block-based synchronization. -o Overwrite or synchronize existing files. If -r is also specified, and synchronization is unavailable, heuristic resume is tried first. -del Remove local file after successful upload. -wait Wait for file close confirmation before completing the upload. -f Assume remote-path is a file (not a directory) -noTime Do not synchronize file modification times. -mustSetTime Time synchronization must succeed, or the command fails. -m=mode Set the access mode for remote files to 'mode'. -dm=mode Set the access mode for new remote directories to 'mode'. If directory already exists, access mode will not be changed. -mirror Mirror local-path to remote-path. Local files that do not exist remotely will be uploaded. Remote files that are different than their local versions will be overwritten. -erase With -mirror, erase remote files that are not present locally. -fastSkip Skip files where local and remote file size and last write time are equal. This can dramatically speed up transfers with many files, at the cost of not checking if file content is actually identical. Ineffective if server omits file size/time in directory listings. -noBuf Whether the server should open file(s) with FILE_FLAG_NO_BUFFERING. Local files are still opened normally. Can speed up uploads to storage not local to the server. No value means yes. -noSync When the destination file already exists, do not synchronize content using hashing, even if the server supports 'check-file-blocks'. FILE TRANSFER MODE - if present, overrides mode selected with "type": -b Upload files as binary; no conversions. -lf Auto-detect text files. In text files, replace CRLF with LF. Binary files are unaffected. -std Auto-detect text files. Upload text files using the SFTP v4+ text file transfer mechanism. Binary files are unaffected. Not available when SFTP version 3 or lower is in use. -tlf Upload all files as textual. Replace all CRLF bytes with LF. -t Upload all files using the SFTP v4+ text file transfer mechanism. Not available when SFTP version 3 or lower is in use. ------------------------------------------------------------------------------ USAGE: queue queue-selection [queue-action [transfer-id | 'all']] DESCRIPTION: Manage background transfer queue. PARAMETERS: queue-selection Either 'download'/'get' or 'upload'/'put', depending on the queue desired. queue-action Use 'list'/'ls' to list the desired queue, or 'remove'/'rm' to remove transfer(s) from the queue. transfer-id When 'remove' is requested, this parameter can specify s transfer to be removed. If all transfers are to be removed, then 'all' keyword should be used instead. ------------------------------------------------------------------------------ USAGE: move remote-source-path remote-destination-path [-d] [-f] [-o] [-lit] DESCRIPTION: Move the specified remote file. PARAMETERS: -d When using wildcards, move matching directories as well. -f Assume remote-destination-path is a file (not a directory). -o Force existing file to be overwritten. -lit Treat remote paths literally (not a wildcard pattern). SYNONYM: mv, rename, ren NOTES: - '-o' option is not available when SFTP version 4 or lower is in use. ------------------------------------------------------------------------------ USAGE: lmove local-source-path local-destination-path [-d] [-f] [-o] DESCRIPTION: Move the specified local file. PARAMETERS: -d When using wildcards, move matching directories as well. -f Assume local-destination-path is a file (not a directory). -o Force existing file to be overwritten. SYNONYM: lmv, lrename, lren ------------------------------------------------------------------------------ USAGE: copy remote-source-path remote-destination-path [-f] [-o] [-lit] DESCRIPTION: Copy the specified remote file. PARAMETERS: -f Assume remote-destination-path is a file (not a directory). -o Force existing file to be overwritten. -lit Treat remote paths literally (not a wildcard pattern). SYNONYM: cp NOTES: - 'copy' is available when SFTP version 6 and higher is in use and 'copy-file' extension is supported on SFTP server. ------------------------------------------------------------------------------ USAGE: lcopy local-source-path local-destination-path [-d] [-f] [-o] DESCRIPTION: Copy the specified local file or directory. PARAMETERS: -d When using wildcards, copy matching directories as well. -f Assume local-destination-path is a file (not a directory). -o Force existing file to be overwritten (valid only for files). SYNONYM: lcp ------------------------------------------------------------------------------ USAGE: del remote-path [-s] [-lit] DESCRIPTION: Delete remote file. PARAMETERS: -s Include subdirectories (recursive). -lit Treat remote-path literally (not a wildcard pattern). -ifExist If the path does not exist, command succeeds without deleting. SYNONYM: rm ------------------------------------------------------------------------------ USAGE: ldel local-path [-s] DESCRIPTION: Delete local file. PARAMETERS: -s Include subdirectories (recursive). -ifExist If the path does not exist, command succeeds without deleting. SYNONYM: lrm ------------------------------------------------------------------------------ USAGE: symlink remote-target-path remote-link-path DESCRIPTION: Create a symbolic link for the specified remote target file. ------------------------------------------------------------------------------ USAGE: ln remote-target-path remote-link-path [-s] DESCRIPTION: Create a link for the specified remote target file. If -s is specified, a symbolic link is created. Otherwise, the new link is a hard link. ------------------------------------------------------------------------------ USAGE: chmod mode remote-path [-s] [-lit] DESCRIPTION: Change the access mode for file 'remote-path' to 'mode'. PARAMETERS: -s Include subdirectories (recursive). -lit Treat remote-path literally (not a wildcard pattern). ------------------------------------------------------------------------------ USAGE: chown owner[:group] remote-path [-s] [-lit] DESCRIPTION: Change the owner (and group, if present) of file 'remote-path' to 'owner' (and 'group'). PARAMETERS: -s Include subdirectories (recursive). -lit Treat remote-path literally (not a wildcard pattern). NOTES: - The syntax of this command is different when SFTP version 3 or lower is in use. ------------------------------------------------------------------------------ USAGE: chgrp group remote-path [-s] [-lit] DESCRIPTION: Change the group of file 'remote-path' to 'group'. PARAMETERS: -s Include subdirectories (recursive). -lit Treat remote-path literally (not a wildcard pattern). NOTES: - The syntax of this command is different when SFTP version 3 or lower is in use. ------------------------------------------------------------------------------ USAGE: attrib remote-path [+ | -] [-x] [-lit] DESCRIPTION: Display or change file attributes. PARAMETERS: -x Include subdirectories (recursive). -lit Treat remote-path literally (not a wildcard pattern). + Set given attributes. Examples: +R, +RA - Clear given attributes. Examples: -S, -RSH Valid attributes: R - Read only S - System H - Hidden A - Archive P - Sparse file C - Compressed E - Encrypted L - Append only M - Immutable Y - Sync W - Case insensitive (read only) NOTES: - Modification of Encrypted, Compressed, and Sparse file attributes may not be instant. - A server might not allow changing Encrypted, Compressed, and/or Sparse file attributes at the same time. ------------------------------------------------------------------------------ USAGE: sha512sum remote-path [-s] [-lit] DESCRIPTION: Calculates SHA-512 digests of remote files. Use 'lsha512sum' to calculate digests of local files. PARAMETERS: -s Include subdirectories (recursive). -lit Treat remote-path literally (not a wildcard pattern). ------------------------------------------------------------------------------ USAGE: sha256sum remote-path [-s] [-lit] DESCRIPTION: Calculates SHA-256 digests of remote files. Use 'lsha256sum' to calculate digests of local files. PARAMETERS: -s Include subdirectories (recursive). -lit Treat remote-path literally (not a wildcard pattern). ------------------------------------------------------------------------------ USAGE: sha1sum remote-path [-s] [-lit] DESCRIPTION: Calculates SHA-1 digests of remote files. Use 'lsha1sum' to calculate digests of local files. PARAMETERS: -s Include subdirectories (recursive). -lit Treat remote-path literally (not a wildcard pattern). ------------------------------------------------------------------------------ USAGE: md5sum remote-path [-s] [-lit] DESCRIPTION: Calculates MD5 digests of remote files. Use 'lmd5sum' to calculate digests of local files. PARAMETERS: -s Include subdirectories (recursive). -lit Treat remote-path literally (not a wildcard pattern). ------------------------------------------------------------------------------ USAGE: lsha512sum local-path [-s] DESCRIPTION: Calculates SHA-512 digests of local files. PARAMETERS: -s Include subdirectories (recursive). ------------------------------------------------------------------------------ USAGE: lsha256sum local-path [-s] DESCRIPTION: Calculates SHA-256 digests of local files. PARAMETERS: -s Include subdirectories (recursive). ------------------------------------------------------------------------------ USAGE: lsha1sum local-path [-s] DESCRIPTION: Calculates SHA-1 digests of local files. PARAMETERS: -s Include subdirectories (recursive). ------------------------------------------------------------------------------ USAGE: lmd5sum local-path [-s] DESCRIPTION: Calculates MD5 digests of local files. PARAMETERS: -s Include subdirectories (recursive). ------------------------------------------------------------------------------ USAGE: df [remote-path] DESCRIPTION: Reports free disk space on the remote directory. ------------------------------------------------------------------------------ USAGE: exec command DESCRIPTION: Executes command on the server. The executed command will not receive any input. This command does not work when the no-flow-control extension is in effect. To disable it, run sftpc with the parameter -noFlowCtl=n. ------------------------------------------------------------------------------ USAGE: !command DESCRIPTION: Execute 'command' in the local shell. If only '!' is entered (no command), an instance of the local shell is launched - exit it to return to SFTP. ------------------------------------------------------------------------------ USAGE: wait DESCRIPTION: Wait for receipt of all outstanding file and directory close confirmations. This command is implied when exiting the session and it does not need to be issued separately there. ------------------------------------------------------------------------------ USAGE: version DESCRIPTION: Display SFTP client and protocol version. SYNONYM: ver ------------------------------------------------------------------------------ USAGE: exit DESCRIPTION: Exit SFTP client. SYNONYM: quit