首页 > 代码库 > 记录一次Linux的怪趣操作

记录一次Linux的怪趣操作

1 场景

今天内网下载一个红帽的ISO文件

 wget http://www.cmdschool.org/rhel-server-5.2-x86_64/rhel-5.2-server-x86_64-dvd.iso

结果下载到68%出错,下载程序另起了一个文件,详细如下(注意第6与16行):

--15:21:52--  http://www.cmdschool.org/rhel-server-5.2-x86_64/rhel-5.2-server-x86_64-dvd.iso
Resolving www.cmdschool.org... 10.10.2.152
Connecting to www.cmdschool.org|10.10.2.152|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3609118720 (3.4G) [application/octet-stream]
Saving to: `rhel-5.2-server-x86_64-dvd.iso‘

68% [======================================================================>                                 ] 2,476,965,424 --.-K/s   in 4m 10s

15:26:03 (9.43 MB/s) - Connection closed at byte 2476965424. Retrying.

--15:26:04--  (try: 2)  http://www.cmdschool.org/rhel-server-5.2-x86_64/rhel-5.2-server-x86_64-dvd.iso
Connecting to www.cmdschool.org|10.10.2.152|:80... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 3609118720 (3.4G), 1132153296 (1.1G) remaining [application/octet-stream]
Saving to: `rhel-5.2-server-x86_64-dvd.iso.1‘

100%[+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++================================>] 3,609,118,720 10.3M/s   in 1m 49s

15:27:53 (9.89 MB/s) - `rhel-5.2-server-x86_64-dvd.iso.1‘ saved [3609118720/3609118720]

You have new mail in /var/spool/mail/root

2 解决方案

试想能不能把文件合成,于是尝试如下操作:

cat rhel-5.2-server-x86_64-dvd.iso.1 >> rhel-5.2-server-x86_64-dvd.iso

通过对比服务器上源文件的MD5

md5sum rhel-5.2-server-x86_64-dvd.iso

显示一样的值:

5390f9f703e083cf1470fb438ea49082  rhel-5.2-server-x86_64-dvd.iso

注:这意味着文件可以这样合成并且可用,太让我高兴了。O(∩_∩)O哈哈~

本文出自 “老谭linux集群博客” 博客,请务必保留此出处http://cmdschool.blog.51cto.com/2420395/1880779

记录一次Linux的怪趣操作