Score:0

curl option --ftp-methods - What's the difference in practice?

us flag

I was having some problem with downloading some ftp files using curl. In the curl manual, there are some methods of calling ftp links as follows:

  • multicwd

    curl does a single CWD operation for each path part in the given URL. For deep hierarchies this means very many commands. This is how RFC 1738 says it should be done. This is the default but the slowest behavior.

  • nocwd

    curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full path to the server for all these commands. This is the fastest behavior.

  • singlecwd

    curl does one CWD with the full target directory and then operates on the file "normally" (like in the multicwd case). This is somewhat more standards compliant than 'nocwd' but without the full penalty of 'multicwd'.

The problem "seems" to be solving by changing it to singlecwd, but I dont know why.

Can someone explain what are the practical differences here? Why changing the directories in the ftp link does make a big difference?

Thanks

Terrance avatar
id flag
Maybe understanding the CWD part might help: https://everything.curl.dev/usingcurl/ftp/traversedir
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.