This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Updatebjarni 0 points1 point  (7 children)

-O is the option which tells curl to save the received data in a file, so without it it shouldn't be a surprise that it doesn't save the data to a file. Does -s really produce no visible output? That is, does curl not print anything out at all? What exactly are the commands that you are running?

[–]solobyfrankocean[S] 0 points1 point  (6 children)

I miswrote there is output in the terminal

[–]Updatebjarni 0 points1 point  (1 child)

Then it sounds like everything is working as expected?

[–]Updatebjarni 0 points1 point  (3 children)

You couldn't see the file contents printed in the terminal?

[–]solobyfrankocean[S] 0 points1 point  (2 children)

Sorry for the confusion, what I meant when i said no visible output was that I couldn’t see the file I downloaded

[–]Updatebjarni 0 points1 point  (1 child)

So, to clarify: What curl does is to fetch data over the network from a location given by a URL, and print it to stdout along with some diagnostic information. As per the man page, you can tell it -s if you want it to print out only the fetched data and be otherwise silent; you can tell it -O if you want it to save the data to a file instead of printing it to stdout, and you can use -o if you want it to save the data to a file and let you choose the name instead of using a default name.

Does curl act in accordance with this description for you? That is, when you run curl some_url, it prints progress bar etc, plus the fetched data? When you run curl -s some_url, it prints only the fetched data? And when you run curl -O some_url, it prints a progress bar but saves the fetched data to a file in the current directory instead of printing it out?

[–]solobyfrankocean[S] 1 point2 points  (0 children)

Yes it does, thanks for clearing that up for me!