[root@lnmp ~]# cd /
[root@lnmp /]# ls -a
. .autofsck boot cmake-3.1.3.tar.gz dev home lib64 media opt root selinux sys usr
.. bin cmake-3.1.3 data etc lib lost+found mnt proc sbin srv tmp var
[root@lnmp /]# rm -rf cmake-3.1.3
[root@lnmp /]# tar -zxvf cmake-3.1.3.tar.gz
cmake-3.1.3/.gitattributes
cmake-3.1.3/.hooks-config.bash
tar: Skipping to next header
gzip: stdin: invalid compressed data--format violated
tar: Child returned status 1
tar: Error is not recoverable: exiting now
文件包cmake-3.1.3.tar.gz通过ftp下载,需要通过二进制下载才能保证解压不会出错
因此:
[root@lnmp /]# ftp 192.168.66.180
Connected to 192.168.66.180 (192.168.66.180).
220 Microsoft FTP Service
Name (192.168.66.180:root): view
331 Password required for view.
Password:
230 User logged in.
Remote system type is Windows_NT.
ftp> bin
200 Type set to I.
ftp> ls -a
227 Entering Passive Mode (192,168,66,180,214,173).
125 Data connection already open; Transfer starting.
03-05-15 05:41PM 588 192.168.66.176.pub
03-06-15 05:05PM 392 authorized_keys
03-11-15 09:26AM 5959549 cmake-3.1.3.tar.gz
03-13-15 02:32PM 59108 ftp-0.17-54.el6.x86_64.rpm
03-06-15 05:06PM 1702 id_rsa
03-13-15 04:03PM 33115859 mysql-5.6.23.tar(1).gz
03-03-15 05:26PM 1933734 pcre-8.34.tar.gz
226 Transfer complete.
ftp> get cmake-3.1.3.tar.gz
local: cmake-3.1.3.tar.gz remote: cmake-3.1.3.tar.gz
227 Entering Passive Mode (192,168,66,180,214,174).
125 Data connection already open; Transfer starting.
226 Transfer complete.
5959549 bytes received in 0.513 secs (11617.78 Kbytes/sec)
ftp> bye
221 Goodbye.
重要命令:bin 表示以二进制方式下载
本文转自 yawei555 51CTO博客,原文链接:http://blog.51cto.com/huwei555/1620137,如需转载请自行联系原作者