wget은 tgz 파일을 HTML로 변환합니다.

wget은 tgz 파일을 HTML로 변환합니다.

다운로드하려고 하는데.tgz파일은 데비안에 있으므로 사용하기로 결정했습니다 wget. 이것은 내 명령줄입니다.

~$ wget http://www.netmet-solutions.org/download/netMETdistrib-4.5_5.8_20160322.tgz

파일을 받았는데 갖고 싶어요아스팔트그래서 나도 그래

~$ tar -zxvf netMETdistrib-4.5_5.8_20160322.tgz

그것은 말한다

gzip: stdin: not in gzip format

그래서 파일을 확인해 보니 이런 게 떴네요.

netMETdistrib-4.5_5.8_20160322.tgz: HTML document, ISO-8859 text, with very long lines

얻다개조된 것tgzHTML 파일인데 이유를 모르겠습니다.

어떤 아이디어가 있나요? 감사해요

답변1

http://www.netmet-solutions.org/download/netMETdistrib-4.5_5.8_20160322.tgz강제로 리디렉션http://www.netmet-solutions.org/Telechargement/Telechargement(표준 HTML 페이지). 따라서 기본적으로 .tgz 파일을 다운로드하는 것이 아니라 간단한 HTML 페이지를 다운로드하는 것입니다. wget의 출력은 리디렉션을 확인합니다.

➤ wget http://www.netmet-solutions.org/download/netMETdistrib-4.5_5.8_20160322.tgz
--2017-04-14 11:14:43--  http://www.netmet-solutions.org/download/netMETdistrib-4.5_5.8_20160322.tgz
Resolving www.netmet-solutions.org... 193.50.27.134
Connecting to www.netmet-solutions.org|193.50.27.134|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: /Telechargement/Telechargement [following]
--2017-04-14 11:14:44--  http://www.netmet-solutions.org/Telechargement/Telechargement
Connecting to www.netmet-solutions.org|193.50.27.134|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `netMETdistrib-4.5_5.8_20160322.tgz'

편집하다:기본적으로 아카이브(http://www.netmet-solutions.org/Telechargement/Jaccepte). wget을 통해 이를 수행하려면 헤더에 예상 쿠키를 전달해야 합니다.

wget --no-cookies --header "Cookie: accepted_licence=chocolat" http://www.netmet-solutions.org/download/netMETdistrib-4.5_5.8_20160322.tgz

, 결과 파일은 gzip 압축 데이터로 인식됩니다.

➤ file netMETdistrib-4.5_5.8_20160322.tgz
netMETdistrib-4.5_5.8_20160322.tgz: gzip compressed data, last modified: Tue Mar 22 12:39:36 2016, from Unix

관련 정보