I'm running 2 curl commands where one downloads all the data into stdout/in until the stack is filled and another uploading whatever is in it out but it seems like the speed is restricted. For the task I'm doing I require it to write into stdin/out as I don't want to write into the disk. Is there a way to delimit the transfer speed?

curl -w "%{stderr}%{size_download}:%{speed_download}\n" -s http://...someurl... -o /dev/stdout 2>output.txt | curl -s -w "%{stderr}%{size_upload}:%{speed_upload}\n" -T - http://...someurl... -o /dev/null 2>>output.txt

output.txt is

96912152:25781365,000 96925509:25373169,000

however, if I run just the download and have it actually save the file

curl -w "%{stderr}%{size_download}:%{speed_download}\n" -s -O http://...someurl... -o /dev/stdout 2>output.txt

output.txt is



I've tried adding the --no-buffer flag to the first command it made no difference in %{speed_download}

  • The manpage mentions that there is a buffer involved for both stdin and stdout. The --no-buffer option can turn off the stdout buffer, so can you try that and see if the speed_download value changes for the first command? – Haxiel May 14 at 16:21
  • @Haxiel Just tried adding the --no-buffer flag and the results were still similar to the first output. This is what I ran curl --no-buffer -w "%{stderr}%{size_download}:%{speed_download}\n" -s http://...someurl... -o /dev/stdout 2>output.txt | curl -s -w "%{stderr}%{size_upload}:%{speed_upload}\n" -T - http://...someurl... -o /dev/null 2>>output.txt – guest723561 May 15 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.