Tries to connect to the specified host. With the
-l option, the "remote" end is opened to the localhost (which does not require a server).
Tries to connect the local side to the specified host. If successful, for example,
lls shows the contents of that host. With the
-l option, the "local" end is opened to the localhost (which does not require a server).
localopen is a synonym for
Closes the remote connection.
Closes the local connection.
Quits the application.
Changes the current remote working directory.
Changes the current local working directory. Also works for a network share.
Prints the name of the current remote working directory.
Prints the name of the current local working directory.
ls [-R] [-l [-z]] [-S] [-r] [file ...]
Lists the names of the files on the remote server. For directories, the contents of the directory are listed.
-R option is specified, the directory trees are listed recursively. (By default, the subdirectories of the argument directories are not visited.)
-l option is specified, file sizes, modification times, permissions and owners (as supported by the file system) are also shown. With
-z, the long-format listing is generated by the client, otherwise
sftp2 shows the server-generated string, if available (with the server-generated string, timestamps are in the server's locale; however, the client-generated string does not have usernames or groups).
-S is given, sorting is done based on file sizes. The default is to sort alphabetically.
-r is given, the sorting order is reversed.
When no arguments are given, it is assumed that the contents of the current directory are being listed. Currently the options
-l are mutually incompatible.
lls [-R] [-l] [file ...]
The same as
ls, but operates on local files.
get [-p] [--overwrite] [-I] [-W] [-c] [--force-lower-case] [file ...]
Transfers the specified files from the remote end to the local end. Directories are recursively copied with their contents.
-p,--preserve-attributes is given,
sftp tries to retain permissions and timestamps.
--overwrite option specifies whether to overwrite existing destination file(s). The default is to overwrite.
-I,--interactive option prompts whether to overwrite an existing destination file (does not work with batch mode).
-W,--whole-file is given, incremental checksums are not made.
-c,--checksum is given, and source and destination files have the same size, an MD5 checksum is done to determine whether the file needs to be transferred. The default is to do checksum.
--force-lower-case option will cause the destination filename to be in lower case. Only ASCII characters will be affected.
All switches can be toggled with
no as an attribute, for example "
mget [options] [file ...]
put [options] [file ...]
Transfers the specified files from the local end to the remote end. Directories are recursively copied with their contents. Options are the same as for
mput [options] [file ...]
Sets both the default file and directory permission bits for upload. Prefix the file permission bits with
p to preserve the permissions of existing files or directories. Use octal numbers to define the permission bits. The default values are 644 for files and 755 for directories.
rename source target
Renames the file
lrename source target
rename, but operates on local files.
Tries to delete the specified file.
The same as
rm, but operates on local files.
Tries to create the specified directory.
The same as
mkdir, but operates on local files.
Tries to delete the specified directory.
The same as
rmdir, but operates on local files.
path is a symbolic link, shows where the link is pointing to.
readlink, but operates on local files.
symlink targetpath linkpath
Creates symbolic link
linkpath, which will point to
lsymlink targetpath linkpath
symlink, but operates on local files.
Dumps the virtual roots of the server. This is an extension required by older versions of VShell (from VanDyke Software), and only usable against it. SSH Tectia Server (Windows version) displays the file system roots in the Unix style, and does not require this extension.
ascii [-s] [-f] [remote_nl_conv] [local_nl_conv]
-s option, shows the current newline convention.
remote_nl_conv sets the remote newline convention.
local_nl_conv operates on the local side, but is not as useful (the correct local newline convention is usually compiled in, so this is mainly for testing). Please note that these are only hints for the underlying transfer layer, which tries to use the newline convention given by the server wherever possible. You can set either of these to
ask, which will cause
sftp to prompt you for the newline convention when needed. With the exception of the
-s option, this command sets the transfer mode to ASCII, i.e. newlines will be converted according to the conventions. Available conventions are
mac, using "
\n", and "
\r" as newlines, respectively.
Files will be transferred unmodified.
Files whose extension matches the one set with
setext will be transferred using ASCII mode. Other files will be transferred unmodified.
setext extension [extension ...]
Set the file types which will be transferred in ASCII mode, if the transfer mode is
auto. Standard zsh-fileglob regexs can be used for matching (only the file extension is matched, i.e. extension "
*ml" matches with files
Displays the extensions of files which will be transferred using ASCII (newline) conversion in the auto transfer mode.
chmod [options] OCTAL-MODE [file ...]
chmod [options] [ugoa][+-=][rwxs] [file ...]
Sets file permissions of the specified file or files to the bit pattern OCTAL-MODE or changes permissions according to the symbolic mode [
Only one symbolic mode combination is supported.
The options are:
recursive (recursively changes files and directories)
silent (error messages suppressed)
verbose (lists every file processed)
Same as chmod, but operates on local files.
no, disables debugging. Otherwise, sets
debuglevel as debug level string, as per command-line option "
Enables verbose mode (identical to the "
-D 2" command-line option). You may later disable verbose mode with the command "
If a topic is not given, lists the available topics. If a topic is given, outputs the available online help on the topic.