quote.d 3.0 KB

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