1 Long: quote 2 Arg: <command> 3 Short: Q 4 Help: Send command(s) to server before transfer 5 Protocols: FTP SFTP 6 Category: ftp sftp 7 --- 8 9 Send an arbitrary command to the remote FTP or SFTP server. Quote commands are 10 sent BEFORE the transfer takes place (just after the initial PWD command in an 11 FTP transfer, to be exact). To make commands take place after a successful 12 transfer, prefix them with a dash '-'. To make commands be sent after curl 13 has changed the working directory, just before the transfer command(s), prefix 14 the command with a '+' (this is only supported for FTP). You may specify any 15 number of commands. 16 17 If the server returns failure for one of the commands, the entire operation 18 will be aborted. You must send syntactically correct FTP commands as RFC 959 19 defines to FTP servers, or one of the commands listed below to SFTP servers. 20 21 Prefix the command with an asterisk (*) to make curl continue even if the 22 command fails as by default curl will stop at first failure. 23 24 This option can be used multiple times. 25 26 SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands 27 itself before sending them to the server. File names may be quoted 28 shell-style to embed spaces or special characters. Following is the list of 29 all supported SFTP quote commands: 30 .RS 31 .IP "atime date file" 32 The atime command sets the last access time of the file named by the file 33 operand. The <date expression> can be all sorts of date strings, see the 34 *curl_getdate(3)* man page for date expression details. (Added in 7.73.0) 35 .IP "chgrp group file" 36 The chgrp command sets the group ID of the file named by the file operand to 37 the group ID specified by the group operand. The group operand is a decimal 38 integer group ID. 39 .IP "chmod mode file" 40 The chmod command modifies the file mode bits of the specified file. The 41 mode operand is an octal integer mode number. 42 .IP "chown user file" 43 The chown command sets the owner of the file named by the file operand to the 44 user ID specified by the user operand. The user operand is a decimal 45 integer user ID. 46 .IP "ln source_file target_file" 47 The ln and symlink commands create a symbolic link at the target_file location 48 pointing to the source_file location. 49 .IP "mkdir directory_name" 50 The mkdir command creates the directory named by the directory_name operand. 51 .IP "mtime date file" 52 The mtime command sets the last modification time of the file named by the 53 file operand. The <date expression> can be all sorts of date strings, see the 54 *curl_getdate(3)* man page for date expression details. (Added in 7.73.0) 55 .IP "pwd" 56 The pwd command returns the absolute pathname of the current working directory. 57 .IP "rename source target" 58 The rename command renames the file or directory named by the source 59 operand to the destination path named by the target operand. 60 .IP "rm file" 61 The rm command removes the file specified by the file operand. 62 .IP "rmdir directory" 63 The rmdir command removes the directory entry specified by the directory 64 operand, provided it is empty. 65 .IP "symlink source_file target_file" 66 See ln. 67 .RE 68