QUOTE - UFTP configuration option

Description

The QUOTE option allows a protocol-specific command string to be sent directly to the host.

A QUOTE option command is not processed by the FTP Client. It is sent as-is to the FTP server, which then executes it as if it were entered in the FTP command shell.

You also can specify a command to be executed by the host with the COMMAND option.

  • A QUOTE option command can be sent to the host with or without a COMMAND option command.
  • A QUOTE option command always is executed before a COMMAND option command.

FTP/S Commands

The complete list of FTP/S server commands is documented in RFC 5797 - FTP Command and Extension Registry.

SFTP Commands

The valid SFTP commands are (reference - cURL Quote Explained):

chgrp group file

The chgrp command sets the group ID of the file named by the file operand to the group ID specified by the group operand. The group operand is a decimal integer group ID.

chmod mode file

The chmod command modifies the file mode bits of the specified file. The mode operand is an octal integer mode number.

chown user file

The chown command sets the owner of the file named by the file operand to the user ID specified by the user operand. The user operand is a decimal integer user ID.

ln source_file target_file

The ln and symlink commands create a symbolic link at the target_file location pointing to the source_file location.

mkdir directory_name

The mkdir command creates the directory named by the directory_name operand.

pwd

The pwd command returns the absolute pathname of the current working directory.

rename source target

The rename command renames the file or directory named by the source operand to the destination path named by the target operand.

rm file

The rm command removes the file specified by the file operand.

rmdir directory

The rmdir command removes the directory entry specified by the directory operand, provided it is empty.

statvfs file

The statvfs command returns statistics on the file system in which specified file resides. (Added in 7.79.0)

symlink source_file target_file

See ln source_file target_file.

Example:

$ uftp -host ftp://SB-l23-x64/ -file readme -user test -pwd test -f /home/build1/quote_CWD

Command file contents:

-quote "CWD //qa/durability_export/"
 

Note

COMMAND commands should always be used when available instead of any protocol-specific command.

"Prefix the command with an asterisk ( * ) to make libcurl continue even if the command fails as by default libcurl will stop at first failure." - cURL Quote Explained

Usage

Specification Method

Parameter / Value

IBM i

HP NonStop

UNIX

Windows

z/OS

Command Line, Short Form

n/a






Command Line, Long Form

-quote command



(tick)

(tick)

(tick)

Environment Variable

n/a






Configuration File Keyword

n/a






Value

command is the name of the command to execute.

Valid values:

Command

Description

src

dst

GET

Retrieves a single file.

required

optional

PUT

Transfers a single file.

required

optional

MGET

Retrieves multiple files.

required

optional

MPUT

Transfers multiple files.

required

optional

DELETE

Deletes a single remote file.

required


MDELETE

Deletes multiple remote files.

required


MKDIR

Creates a directory on a remote computer.

required


RMDIR

Removes a directory on a remote computer.

required



Note

Do not use the LIST command with the QUOTE option; this will not work correctly with libcurl. Instead, use the COMMAND option.