curl下載文件
curl訪問(wèn)網(wǎng)頁(yè)中的文件,不加參數(shù)的話,文件內(nèi)容會(huì)被輸出到stdout,下載進(jìn)度會(huì)被輸出到stderr中。如下參數(shù)解決這個(gè)問(wèn)題:
curl URL -o filename --progress
選項(xiàng) -o 將下載數(shù)據(jù)寫(xiě)入到指定名稱(chēng)的文件中,并使用 –progress 顯示進(jìn)度條。
例子:
curl -b ck.txt -k https://192.168.2.210/aml/system/snapshot -o 1.tgz