quote.d 3.2 KB

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