2023-01-02 20:51:48 +08:00
|
|
|
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2022-06-14 06:12:03 +08:00
|
|
|
SPDX-License-Identifier: curl
|
2016-11-28 07:50:25 +08:00
|
|
|
Long: quote
|
2021-07-13 11:09:26 +08:00
|
|
|
Arg: <command>
|
2016-12-17 05:01:01 +08:00
|
|
|
Short: Q
|
2016-11-28 07:50:25 +08:00
|
|
|
Help: Send command(s) to server before transfer
|
|
|
|
Protocols: FTP SFTP
|
2020-07-13 20:15:04 +08:00
|
|
|
Category: ftp sftp
|
2021-08-31 22:37:14 +08:00
|
|
|
Example: --quote "DELE file" ftp://example.com/foo
|
2021-09-28 17:50:07 +08:00
|
|
|
Added: 5.3
|
2021-11-15 22:58:20 +08:00
|
|
|
See-also: request
|
2022-10-18 16:39:43 +08:00
|
|
|
Multi: append
|
2016-11-28 07:50:25 +08:00
|
|
|
---
|
|
|
|
Send an arbitrary command to the remote FTP or SFTP server. Quote commands are
|
|
|
|
sent BEFORE the transfer takes place (just after the initial PWD command in an
|
|
|
|
FTP transfer, to be exact). To make commands take place after a successful
|
2022-03-30 00:11:03 +08:00
|
|
|
transfer, prefix them with a dash '-'.
|
|
|
|
|
|
|
|
(FTP only) To make commands be sent after curl has changed the working
|
|
|
|
directory, just before the file transfer command(s), prefix the command with a
|
|
|
|
'+'. This is not performed when a directory listing is performed.
|
|
|
|
|
|
|
|
You may specify any number of commands.
|
2016-11-28 07:50:25 +08:00
|
|
|
|
2021-07-26 14:54:13 +08:00
|
|
|
By default curl will stop at first failure. To make curl continue even if the
|
|
|
|
command fails, prefix the command with an asterisk (*). Otherwise, if the
|
|
|
|
server returns failure for one of the commands, the entire operation will be
|
|
|
|
aborted.
|
2016-11-28 07:50:25 +08:00
|
|
|
|
2021-07-26 14:54:13 +08:00
|
|
|
You must send syntactically correct FTP commands as RFC 959 defines to FTP
|
|
|
|
servers, or one of the commands listed below to SFTP servers.
|
2019-06-13 04:36:47 +08:00
|
|
|
|
2016-11-28 07:50:25 +08:00
|
|
|
SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands
|
2021-11-26 15:46:59 +08:00
|
|
|
itself before sending them to the server. File names may be quoted
|
|
|
|
shell-style to embed spaces or special characters. Following is the list of
|
2016-11-28 07:50:25 +08:00
|
|
|
all supported SFTP quote commands:
|
|
|
|
.RS
|
2023-06-22 19:18:30 +08:00
|
|
|
.TP
|
|
|
|
.B "atime date file"
|
2020-08-14 07:38:49 +08:00
|
|
|
The atime command sets the last access time of the file named by the file
|
|
|
|
operand. The <date expression> can be all sorts of date strings, see the
|
2021-03-22 23:50:57 +08:00
|
|
|
*curl_getdate(3)* man page for date expression details. (Added in 7.73.0)
|
2023-06-22 19:18:30 +08:00
|
|
|
.TP
|
|
|
|
.B "chgrp group file"
|
2016-11-28 07:50:25 +08:00
|
|
|
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.
|
2023-06-22 19:18:30 +08:00
|
|
|
.TP
|
|
|
|
.B "chmod mode file"
|
2016-11-28 07:50:25 +08:00
|
|
|
The chmod command modifies the file mode bits of the specified file. The
|
|
|
|
mode operand is an octal integer mode number.
|
2023-06-22 19:18:30 +08:00
|
|
|
.TP
|
|
|
|
.B "chown user file"
|
2016-11-28 07:50:25 +08:00
|
|
|
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.
|
2023-06-22 19:18:30 +08:00
|
|
|
.TP
|
|
|
|
.B "ln source_file target_file"
|
2016-11-28 07:50:25 +08:00
|
|
|
The ln and symlink commands create a symbolic link at the target_file location
|
|
|
|
pointing to the source_file location.
|
2023-06-22 19:18:30 +08:00
|
|
|
.TP
|
|
|
|
.B "mkdir directory_name"
|
2016-11-28 07:50:25 +08:00
|
|
|
The mkdir command creates the directory named by the directory_name operand.
|
2023-06-22 19:18:30 +08:00
|
|
|
.TP
|
|
|
|
.B "mtime date file"
|
2020-08-14 07:38:49 +08:00
|
|
|
The mtime command sets the last modification time of the file named by the
|
|
|
|
file operand. The <date expression> can be all sorts of date strings, see the
|
2021-03-22 23:50:57 +08:00
|
|
|
*curl_getdate(3)* man page for date expression details. (Added in 7.73.0)
|
2023-06-22 19:18:30 +08:00
|
|
|
.TP
|
|
|
|
.B "pwd"
|
2016-11-28 07:50:25 +08:00
|
|
|
The pwd command returns the absolute pathname of the current working directory.
|
2023-06-22 19:18:30 +08:00
|
|
|
.TP
|
|
|
|
.B "rename source target"
|
2016-11-28 07:50:25 +08:00
|
|
|
The rename command renames the file or directory named by the source
|
|
|
|
operand to the destination path named by the target operand.
|
2023-06-22 19:18:30 +08:00
|
|
|
.TP
|
|
|
|
.B "rm file"
|
2016-11-28 07:50:25 +08:00
|
|
|
The rm command removes the file specified by the file operand.
|
2023-06-22 19:18:30 +08:00
|
|
|
.TP
|
|
|
|
.B "rmdir directory"
|
2016-11-28 07:50:25 +08:00
|
|
|
The rmdir command removes the directory entry specified by the directory
|
|
|
|
operand, provided it is empty.
|
2023-06-22 19:18:30 +08:00
|
|
|
.TP
|
|
|
|
.B "symlink source_file target_file"
|
2016-11-28 07:50:25 +08:00
|
|
|
See ln.
|
|
|
|
.RE
|
2023-06-22 19:18:30 +08:00
|
|
|
.IP
|