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