[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).
5959549 bytes received in 0.513 secs (11617.78 Kbytes/sec)
ftp> bye
221 Goodbye.
重要指令:bin 表示以二進制方式下載下傳
本文轉自 yawei555 51CTO部落格,原文連結:http://blog.51cto.com/huwei555/1620137,如需轉載請自行聯系原作者