LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-28-2011, 06:16 AM   #1
drManhattan
Member
 
Registered: Aug 2010
Location: Warsaw, Poland
Distribution: Ubuntu 10.04 LTS on IBM Lenovo R61e, RHEL5-6,SLES10-11
Posts: 262

Rep: Reputation: 1
wget issue


Hi

I'm trying to download nagios app by using wget cmd.
I perform the following :
Code:
 wget http://sourceforge.net/projects/nagios/files/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz/download
and when I check header of downloaded file
Code:
debian:/tmp# file nagio*
nagios-3.2.3.tar.gz:   HTML document text
it shows it is HTML doc text. I can gunzip it becasue
Code:
debian:/tmp# gunzip nag*
gzip: nagios-3.2.3.tar.gz: not in gzip format
How can I download this file with wget and then gunzip it ?

thx for help.
 
Old 02-28-2011, 06:25 AM   #2
sumeet inani
Member
 
Registered: Oct 2008
Posts: 898
Blog Entries: 26

Rep: Reputation: 49
It is simple , you have given link of something/download so you are redirected to download webpage not the desired file.
Run this
Code:
wget http://sourceforge.net/projects/nagios/files/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz
Your output will be similiar to
Code:
--2011-02-28 16:55:18--  http://sourceforge.net/projects/nagios/files/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz
Resolving sourceforge.net... 216.34.181.60
Connecting to sourceforge.net|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://sourceforge.net/projects/nagios/files/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz/download [following]
--2011-02-28 16:55:27--  http://sourceforge.net/projects/nagios/files/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz/download
Connecting to sourceforge.net|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://downloads.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz?r=&ts=1298892378&use_mirror=citylan [following]
--2011-02-28 16:55:31--  http://downloads.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz?r=&ts=1298892378&use_mirror=citylan
Resolving downloads.sourceforge.net... 216.34.181.59
Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://citylan.dl.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz [following]
--2011-02-28 16:55:40--  http://citylan.dl.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz
Resolving citylan.dl.sourceforge.net... 212.118.44.106, 2a03:1800:1:7::2
Connecting to citylan.dl.sourceforge.net|212.118.44.106|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3249447 (3.1M) [application/x-gzip]
Saving to: `nagios-3.2.3.tar.gz'

 8% [======>                                                                             ] 2,91,035    19.7K/s  eta 2m 37s
The link I gave to wget ends in .gz
In your case there was additional '/download' at the end which was not desired.

To know any command just run 'man command_name' without quotes).

In your case I think you have to extract that tarball.
So

(1)run 'gunzip -d tarball_name'
the gzip file will be replaced by name.tar
unpack tar file using 'tar -xvf name.tar'
Here v=verbose,x=extract,f=designate archive

OR

tar -xvzf name.tar.gz
tar -xvjf name.tar.bz2

NOTE: In (1) the gzipped tarball is replaced by extracted tar ,so alternative is preferred.

HAPPY , then add to reputation.

Last edited by sumeet inani; 02-28-2011 at 07:02 AM. Reason: more information to facilitate understanding
 
Old 02-28-2011, 06:57 AM   #3
drManhattan
Member
 
Registered: Aug 2010
Location: Warsaw, Poland
Distribution: Ubuntu 10.04 LTS on IBM Lenovo R61e, RHEL5-6,SLES10-11
Posts: 262

Original Poster
Rep: Reputation: 1
thx.
It works.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FC9 DNS issue; Can not YUM or WGET but but can ping and dig rtuin Fedora 0 01-12-2009 04:36 PM
wget not working! but "man wget is" ??? wrapster Solaris / OpenSolaris 5 07-30-2008 04:00 AM
wget mirroring issue - GET variables Freezy Linux - Networking 4 02-17-2006 07:31 PM
wget issue, basic but typical emailssent Linux - Newbie 3 03-03-2005 04:22 PM
wget issue Equin Linux - General 0 10-17-2004 07:28 PM


All times are GMT -5. The time now is 09:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration