Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I type the following:

http://www.archlinux.org/packages/extra/x86_64/enca/download/ 

wget is downloading index.html instead of the correct file which is: enca-1.13-2-x86_64.pkg.tar.xz

When I use a windows machine and navigate to the same location, it correctly prompts me to download the tarball package.

share|improve this question

2 Answers 2

Hmm, uh, works for me! I'm using wget 1.11.4 on a CentOS5 box, fwiw.

If I do a a curl, I get:

$ curl -Iv http://www.archlinux.org/packages/extra/x86_64/enca/download/
* About to connect() to www.archlinux.org port 80
*   Trying 66.211.214.131... connected
* Connected to www.archlinux.org (66.211.214.131) port 80
> HEAD /packages/extra/x86_64/enca/download/ HTTP/1.1
> User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Host: www.archlinux.org
> Accept: */*
>
< HTTP/1.1 302 FOUND
HTTP/1.1 302 FOUND
< Date: Sun, 04 Mar 2012 19:20:24 GMT
Date: Sun, 04 Mar 2012 19:20:24 GMT
< Server: Apache
Server: Apache
< Location: http://mirrors.kernel.org/archlinux/extra/os/x86_64/enca-1.13-2-x86_64.pkg.tar.xz
Location: http://mirrors.kernel.org/archlinux/extra/os/x86_64/enca-1.13-2-x86_64.pkg.tar.xz

So the redirection is correct, at least on the mirror I'm hitting.

share|improve this answer

Try instead:

wget --trust-server-names http://www.archlinux.org/packages/extra/x86_64/enca/download/

"--trust-server-names

If this is set to on, on a redirect the last component of the redirection URL will be used as the local file name. By default it is used the last component in the original URL."

share|improve this answer

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.