Como baixar um arquivo .tar.gz de um link redirecionado no terminal?

3

Eu quero baixar o arquivo em link como um arquivo .tar.gz usando terminal, mas o problema é que quando Eu uso:

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

Faz o download de um arquivo e o nomeia 1806 , mas não é uma pasta que não seja um arquivo .tar.gz que eu possa extrair.

Por favor, deixe-me saber como posso fazer isso dentro do terminal.

Atenciosamente.

    
por Brown 08.07.2013 / 16:41

1 resposta

5

De man wget :

   -O file
   --output-document=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
       document.
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... 23.23.143.164
Connecting to www.snort.org|23.23.143.164|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://s3.amazonaws.com/snort-org/www/snort-current/20120718
/daq-1.1.1.tar.gz?AWSAccessKeyId=AKIAJ65S5YX6KA26VRJQ&Expires=1373294936&
Signature=MsjjmadNXZO2b9e8Pi8IrJJjw6M%3D [following]
--14:43:10--  http://s3.amazonaws.com/snort-org/www/snort-current/20120718
/daq-1.1.1.tar.gz?AWSAccessKeyId=AKIAJ65S5YX6KA26VRJQ&Expires=1373294936&
Signature=MsjjmadNXZO2b9e8Pi8IrJJjw6M%3D
           => 'test.tar.gz'
Resolving s3.amazonaws.com... 176.32.99.38
Connecting to s3.amazonaws.com|176.32.99.38|: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
    
por Rinzwind 08.07.2013 / 16:44