How do I download a file from SourceForge with wget?
You could use wget only if you are fine that you will use an experimental functionality, which is the required "--content-disposition" option.
wget --content-disposition -c https://sourceforge.net/projects/freetype/files/freetype2/2.8/freetype-2.8.tar.bz2
All redirections are handled automagically, see the output below.
--2017-07-22 22:26:05-- https://sourceforge.net/projects/freetype/files/freetype2/2.8/freetype-2.8.tar.bz2
Resolving sourceforge.net... 216.34.181.60
Connecting to sourceforge.net|216.34.181.60|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://sourceforge.net/projects/freetype/files/freetype2/2.8/freetype-2.8.tar.bz2/download [following]
--2017-07-22 22:26:06-- https://sourceforge.net/projects/freetype/files/freetype2/2.8/freetype-2.8.tar.bz2/download
Connecting to sourceforge.net|216.34.181.60|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://downloads.sourceforge.net/project/freetype/freetype2/2.8/freetype-2.8.tar.bz2?r=&ts=1500755167&use_mirror=kent [following]
--2017-07-22 22:26:07-- https://downloads.sourceforge.net/project/freetype/freetype2/2.8/freetype-2.8.tar.bz2?r=&ts=1500755167&use_mirror=kent
Resolving downloads.sourceforge.net... 216.34.181.59
Connecting to downloads.sourceforge.net|216.34.181.59|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://kent.dl.sourceforge.net/project/freetype/freetype2/2.8/freetype-2.8.tar.bz2 [following]
--2017-07-22 22:26:08-- https://kent.dl.sourceforge.net/project/freetype/freetype2/2.8/freetype-2.8.tar.bz2
Resolving kent.dl.sourceforge.net... 212.219.56.185
Connecting to kent.dl.sourceforge.net|212.219.56.185|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1873526 (1.8M) [application/octet-stream]
--2017-07-22 22:26:08-- https://kent.dl.sourceforge.net/project/freetype/freetype2/2.8/freetype-2.8.tar.bz2
Connecting to kent.dl.sourceforge.net|212.219.56.185|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1873526 (1.8M) [application/octet-stream]
Saving to: ‘freetype-2.8.tar.bz2’
freetype-2.8.tar.bz2 100%[==========================================================================================================>] 1.79M 5.60MB/s in 0.3s
2017-07-22 22:26:08 (5.60 MB/s) - ‘freetype-2.8.tar.bz2’ saved [1873526/1873526]
Update to provide more details
➜ ~ ls -ld $(which wget)
lrwxr-xr-x 1 duda admin 32 4 črv 19:44 /usr/local/bin/wget -> ../Cellar/wget/1.19.1_1/bin/wget
➜ ~ wget --version
GNU Wget 1.19.1 built on darwin16.6.0.
-cares +digest -gpgme +https +ipv6 -iri +large-file -metalink -nls
+ntlm +opie -psl +ssl/openssl
Wgetrc:
/usr/local/etc/wgetrc (system)
Compile:
clang -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc"
-DLOCALEDIR="/usr/local/Cellar/wget/1.19.1_1/share/locale" -I.
-I../lib -I../lib -I/usr/local/opt/[email protected]/include -DNDEBUG
Link:
clang -DNDEBUG -liconv -L/usr/local/opt/[email protected]/lib -lssl
-lcrypto -ldl -lz ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Originally written by Hrvoje Niksic <[email protected]>.
Please send bug reports and questions to <[email protected]>.