"What’s the difference between the -O and -o curl flags?"
Hey folks!
I keep mixing up the -O and -o curl flags when downloading files, and it’s driving me nuts. Like, I know both are for saving stuff, but when do I use which?
From what I *think*:
- `-O` saves the file with its original name from the URL (super handy for quick grabs).
- `-o` lets you specify a custom filename (great for organizing).
But am I missing something?
Sometimes I’ll do `curl -O https://example.com/file.zip` and it works, but other times I need `curl -o myfile.zip https://example.com/file.zip`.
Anyone else wrestle with this? Or is there a pro tip I’m overlooking?
Thanks!
(Also, sorry if this is a noob question—still getting the hang of curl flags!)
Hey folks!
I keep mixing up the -O and -o curl flags when downloading files, and it’s driving me nuts. Like, I know both are for saving stuff, but when do I use which?
From what I *think*:
- `-O` saves the file with its original name from the URL (super handy for quick grabs).
- `-o` lets you specify a custom filename (great for organizing).
But am I missing something?
Sometimes I’ll do `curl -O https://example.com/file.zip` and it works, but other times I need `curl -o myfile.zip https://example.com/file.zip`.
Anyone else wrestle with this? Or is there a pro tip I’m overlooking?
Thanks!
(Also, sorry if this is a noob question—still getting the hang of curl flags!)
