wget及curl指令下載檔案

wget用法

# wget -P /root/Desktop ftp://gnu.mirror.iweb.com/gcc/gcc-4.8.2/gcc-4.8.2.tar.gz //參數-p:儲存到指定的目錄
  --2014-03-20 22:30:11-- ftp://gnu.mirror.iweb.com/gcc/gcc-4.8.2/gcc-4.8.2.tar.gz
    => “/root/Desktop/gcc-4.8.2.tar.gz”
  Resolving gnu.mirror.iweb.com... 70.38.0.144, 2607:f748:10:12::6:1
  Connecting to gnu.mirror.iweb.com|70.38.0.144|:21... connected.
  Logging in as anonymous ... Logged in!
  ==> SYST ... done. ==> PWD ... done.
  ==> TYPE I ... done. ==> CWD (1) /gcc/gcc-4.8.2 ... done.
  ==> SIZE gcc-4.8.2.tar.gz ... 110513936
  ==> PASV ... done. ==> RETR gcc-4.8.2.tar.gz ... done.
  Length: 110513936 (105M) (unauthoritative)

28% [================>                ] 31,242,540 297K/s eta 4m 56s

curl用法

# curl -R -O ftp://gnu.mirror.iweb.com/gcc/gcc-4.8.2/gcc-4.8.2.tar.gz
 % Total % Received % Xferd Average Speed Time Time Time Current
                        Dload Upload Total Spent Left Speed
 3 105M 3 3310k   0   0  191k 0 0:09:23 0:00:17 0:09:06 312k
參數-O:使用伺服器上的檔案名,存在本地。
參數-R:在本地生成文件時,使用遠端的時間郵戳(timestamp)。

沒有留言:

張貼留言