I want to download the file at http://www.snort.org/downloads/1806 as a .tar.gz file using terminal but the problem is that when I use:

sudo wget http://www.snort.org/downloads/1806

It downloads a file and names it 1806 but it isn't a folder not a .tar.gz file which I can extract.

Please let me know how can I do this from within the terminal.


  • You should accept the fine answer from Rinzwind! – gsamaras Jun 6 '15 at 14:49

From man wget:

   -O file
       The documents will not be written to the appropriate files, but all will be
       concatenated together and written to file.  If - is used as file, documents
       will be printed to standard output, disabling link conversion.  (Use ./- to
       print to a file literally named -.)

       Note that a combination with -k is only well-defined for downloading a single

wget http://www.snort.org/downloads/1806 -O test.tar.gz
--14:43:10--  http://www.snort.org/downloads/1806
           => `test.tar.gz'
Resolving www.snort.org...
Connecting to www.snort.org||:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://s3.amazonaws.com/snort-org/www/snort-current/20120718
Signature=MsjjmadNXZO2b9e8Pi8IrJJjw6M%3D [following]
--14:43:10--  http://s3.amazonaws.com/snort-org/www/snort-current/20120718
           => `test.tar.gz'
Resolving s3.amazonaws.com...
Connecting to s3.amazonaws.com||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 472,223 (461K) [binary/octet-stream]

100%[==========================================>] 472,223      664.17K/s

14:43:13 (662.69 KB/s) - `test.tar.gz' saved [472223/472223]

$ tar tvfz test.tar.gz
drwxr-xr-x 0/0               0 2012-07-10 19:51 daq-1.1.1/
-rwxr-xr-x 0/0           13663 2012-07-10 19:32 daq-1.1.1/install-sh
-rw-r--r-- 0/0           20997 2010-09-23 19:12 daq-1.1.1/COPYING
-rw-r--r-- 0/0           34823 2012-07-10 19:32 daq-1.1.1/aclocal.m4
-rw-r--r-- 0/0           22768 2012-07-10 19:33 daq-1.1.1/Makefile.in
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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