1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Long: quote 5Arg: <command> 6Short: Q 7Help: Send command(s) to server before transfer 8Protocols: FTP SFTP 9Category: ftp sftp 10Added: 5.3 11Multi: append 12See-also: 13 - request 14Example: 15 - --quote "DELE file" ftp://example.com/foo 16--- 17 18# `--quote` 19 20Send an arbitrary command to the remote FTP or SFTP server. Quote commands are 21sent BEFORE the transfer takes place (just after the initial **PWD** command 22in an FTP transfer, to be exact). To make commands take place after a 23successful transfer, prefix them with a dash '-'. 24 25(FTP only) To make commands be sent after curl has changed the working 26directory, just before the file transfer command(s), prefix the command with a 27'+'. This is not performed when a directory listing is performed. 28 29You may specify any number of commands. 30 31By default curl stops at first failure. To make curl continue even if the 32command fails, prefix the command with an asterisk (*). Otherwise, if the 33server returns failure for one of the commands, the entire operation is 34aborted. 35 36You must send syntactically correct FTP commands as RFC 959 defines to FTP 37servers, or one of the commands listed below to SFTP servers. 38 39SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands 40itself before sending them to the server. Filenames may be quoted shell-style 41to embed spaces or special characters. Following is the list of all supported 42SFTP quote commands: 43 44## atime date file 45The atime command sets the last access time of the file named by the file 46operand. The date expression can be all sorts of date strings, see the 47*curl_getdate(3)* man page for date expression details. (Added in 7.73.0) 48 49## chgrp group file 50The chgrp command sets the group ID of the file named by the file operand to 51the group ID specified by the group operand. The group operand is a decimal 52integer group ID. 53 54## chmod mode file 55The chmod command modifies the file mode bits of the specified file. The 56mode operand is an octal integer mode number. 57 58## chown user file 59The chown command sets the owner of the file named by the file operand to the 60user ID specified by the user operand. The user operand is a decimal 61integer user ID. 62 63## ln source_file target_file 64The ln and symlink commands create a symbolic link at the target_file location 65pointing to the source_file location. 66 67## mkdir directory_name 68The mkdir command creates the directory named by the directory_name operand. 69 70## mtime date file 71The mtime command sets the last modification time of the file named by the 72file operand. The date expression can be all sorts of date strings, see the 73*curl_getdate(3)* man page for date expression details. (Added in 7.73.0) 74 75## pwd 76The pwd command returns the absolute path name of the current working directory. 77 78## rename source target 79The rename command renames the file or directory named by the source 80operand to the destination path named by the target operand. 81 82## rm file 83The rm command removes the file specified by the file operand. 84 85## rmdir directory 86The rmdir command removes the directory entry specified by the directory 87operand, provided it is empty. 88 89## symlink source_file target_file 90See ln. 91