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 | |||||
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 |
---|---|---|---|
Retrieves a single file. | required | optional | |
Transfers a single file. | required | optional | |
Retrieves multiple files. | required | optional | |
Transfers multiple files. | required | optional | |
Deletes a single remote file. | required | ||
Deletes multiple remote files. | required | ||
Creates a directory on a remote computer. | required | ||
Removes a directory on a remote computer. | required |