Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am new to Linux, i want to write the perl script to download the files from FTP sites but here i want to use curl command to download the files. which is working fine in wget command but not working with curl command.

The below coommand is downloading the file from SFTP servers, Here i have mentioned the SFTP username/password mentioned in the wgetrc_proxy file and mentioned the directory path where to download the in the my linux box.

WGETRC=/hom1/sara/wgetrc_proxy wget --directory-prefix=/hom1/sara/

I tried the same scenario using CURL, but which is not working.

WGETRC=/hom1/sara/wgetrc_proxy curl --directory-prefix=/hom1/sara/

wgetrc_proxy contains below things.

-sh-3.00$ cat wgetrc_proxy
netrc = off



What mistake i have done here, else missed any environment configuration. Please help me out to resolve this issue.

share|improve this question

1 Answer 1

curl doesn't support a wgetrc file or the same command line options as wget. Use man curl to get the complete list of available options.

This should do:

cd /hom1/sara/ && curl --max-time 180 --proxy aaaa:xxxx@$http_proxy
share|improve this answer

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.