Take the 2-minute tour ×
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.

Simply typing http://downloads.sourceforge.net/project/romfs/genromfs/0.5.2/genromfs-0.5.2.tar.gz works fine on a browser, but I'm trying to download from a CLI environment with limited utilities.

The following just returns an empty file:

curl http://downloads.sourceforge.net/project/romfs/genromfs/0.5.2/genromfs-0.5.2.tar.gz

How do I get genromfs-0.5.2.tar.gz from sourceforge using curl?

share|improve this question
add comment

3 Answers

up vote 10 down vote accepted

You can do

curl -L  http://downloads.sourceforge.net/project/romfs/genromfs/0.5.2/genromfs-0.5.2.tar.gz > genromfs.tar.gz

to download the file.

The -L tells curl to follow any redirects, which sourceforge normally does.

If wget is available, that would be far simpler.

share|improve this answer
    
Unfortunately wget wasn't available by default in the live CD I am using. –  math4tots Feb 16 '12 at 10:54
add comment

http://sourceforge.net/p/forge/documentation/rsync/ describes how project owners can use rsync to download files.

For example, to download all files from https://sourceforge.net/projects/dvn/files/ I used this:

rsync -avP -e ssh pdurbin,dvn@frs.sourceforge.net:/home/frs/project/d/dv/dvn/ .
share|improve this answer
add comment

You have to use -L option, because sourceforge uses redirects to the download location. Try -v switch and you will see headers of requests and answers.

share|improve this answer
add comment

Your Answer

 
discard

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.