LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-12-2009, 08:33 AM   #1
centguy
Member
 
Registered: Feb 2008
Posts: 627
Blog Entries: 1

Rep: Reputation: 48
wget : any side effect after retrying ?


I am downloading an iso and for reason the connection is lost temporarily. But the wget right now continues its job:

Quote:
[ckgan@centos52-64-fuj C5.3-iso]$ wget http://ftp.riken.jp/Linux/centos/5.3...64-bin-DVD.iso
--17:00:57-- http://ftp.riken.jp/Linux/centos/5.3...64-bin-DVD.iso
Resolving ftp.riken.jp... 134.160.38.1
Connecting to ftp.riken.jp|134.160.38.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4557455360 (4.2G) [text/plain]
Saving to: `CentOS-5.3-x86_64-bin-DVD.iso'

47% [================> ] 2,147,483,647 --.-K/s in 3h 3m

20:04:22 (191 KB/s) - Connection closed at byte 2147483647. Retrying.

--20:04:23-- (try: 2) http://ftp.riken.jp/Linux/centos/5.3...64-bin-DVD.iso
Connecting to ftp.riken.jp|134.160.38.1|:80... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 4557455360 (4.2G), 2409971713 (2.2G) remaining [text/plain]
Saving to: `CentOS-5.3-x86_64-bin-DVD.iso.1'

The question is: Will wget knows how to concatenate both
Quote:
-rw-rw-r-- 1 ckgan ckgan 867538672 Jun 12 21:32 CentOS-5.3-x86_64-bin-DVD.iso.1
-rw-rw-r-- 1 ckgan ckgan 2147483647 Jun 12 20:03 CentOS-5.3-x86_64-bin-DVD.iso
I don't intend to wget again after waiting several hours.

Thanks!!
 
Old 06-12-2009, 09:41 AM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by centguy View Post
Code:
[ckgan@centos52-64-fuj C5.3-iso]$ wget http://ftp.riken.jp/Linux/centos/5.3...64-bin-DVD.iso
You forgot to use the "-c" option. wget can only continue an interrupted download if you use the "-c" option. Read the man page.
 
Old 06-12-2009, 11:50 AM   #3
centguy
Member
 
Registered: Feb 2008
Posts: 627

Original Poster
Blog Entries: 1

Rep: Reputation: 48
(1) I thought -c option is used when there is already a partial file
lying around from a previous invokation of wget. Okay, in the future,
I will use this "-c" even though the file is empty.

(2) I now have three files:
Quote:
-rw-rw-r-- 1 ckgan ckgan 2147483647 Jun 12 23:39 CentOS-5.3-x86_64-bin-DVD.iso.1
-rw-rw-r-- 1 ckgan ckgan 2147483647 Jun 12 20:03 CentOS-5.3-x86_64-bin-DVD.iso
-rw-rw-r-- 1 ckgan ckgan 262488066 Mar 30 03:45 CentOS-5.3-x86_64-bin-DVD.iso.2
Looks like riken.jp server is smart enough to interrupt the download
exactly at 2147483647.

Since 2147483647 + 2147483647 + 262488066 = 4557455360, the exact file size of the iso, I should think of a way to concat them together.
Now, an interesting situation arise, I only have 2.3 GB space left. Wonder how to do this elegantly.
 
Old 06-12-2009, 12:57 PM   #4
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by centguy View Post
(1) I thought -c option is used when there is already a partial file lying around from a previous invokation of wget.
Yes, that is what the man page says. However, I have only had success restarting a "wget" download if the first try was attempted with "-c". Maybe I have been using a defective version of "wget".

Quote:
Originally Posted by centguy View Post
(2) I now have three files:
Looks like riken.jp server is smart enough to interrupt the download
exactly at 2147483647.
I would not call that smart.

Quote:
Originally Posted by centguy View Post
Since 2147483647 + 2147483647 + 262488066 = 4557455360, the exact file size of the iso. I should think of a way to concat them together.
Normally, the solution would be
Code:
# cat CentOS-5.3-x86_64-bin-DVD.iso.1 CentOS-5.3-x86_64-bin-DVD.iso.2 >> CentOS-5.3-x86_64-bin-DVD.iso
However, you do not have enough storage for that. You can instead do
Code:
# cat CentOS-5.3-x86_64-bin-DVD.iso.1 >> CentOS-5.3-x86_64-bin-DVD.iso
# rm CentOS-5.3-x86_64-bin-DVD.iso.1
# cat CentOS-5.3-x86_64-bin-DVD.iso.2 >> CentOS-5.3-x86_64-bin-DVD.iso
# rm CentOS-5.3-x86_64-bin-DVD.iso.2
That should sort you out.

NOTE: Be very careful to use the ">>" instead of the ">". The ">>" is append and ">" is overwrite.
 
Old 06-12-2009, 01:47 PM   #5
centguy
Member
 
Registered: Feb 2008
Posts: 627

Original Poster
Blog Entries: 1

Rep: Reputation: 48
I forgot I have an external hard drive lying around.
Concat went well, and md5sum is good.

At least this is a good experience with wget on CentOS5.2.

Thanks!
 
  


Reply



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
DHCP - keep retrying renew after failure??? bfoddy Linux - Networking 8 11-14-2008 03:02 PM
LXer: Top Linux photo managers side-by-side LXer Syndicated Linux News 0 12-14-2006 06:33 PM
latex, floating tables side by side? hedpe Programming 3 10-29-2006 10:39 AM
stop sendmail from retrying to send old mail fobster Linux - General 1 10-03-2006 03:54 PM
ENOMEM in do_get_write_access, retrying da_kidd_er Linux - Enterprise 1 11-18-2004 09:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:58 AM.

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
Open Source Consulting | Domain Registration