Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I'm using curl in this syntax:

curl -o myfile.jpg

If I run this command twice, I get two files:


How can I tell CURL that I want it to overwrite the file if it exists?

share|improve this question

migrated from Aug 28 '11 at 16:23

This question came from our site for system and network administrators.

Cannot reproduce: what curl version on which system? –  enzotib Aug 28 '11 at 16:34

1 Answer 1

up vote 8 down vote accepted


curl > myfile.jpg
share|improve this answer
And beforehand, make sure you do not have the noclobber option enabled (set +o noclobber). –  rozcietrzewiacz Aug 28 '11 at 17:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.