quote.d 3.0 KB

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