Linux wget是一個下載文件的工具,它用在命令行下。對于Linux用戶是必不可少的工具,尤其對于網(wǎng)絡(luò)管理員,經(jīng)常要下載一些軟件或從遠程服務(wù)器恢復(fù)備份到本地服務(wù)器。如果我們使用虛擬主機,處理這樣的事務(wù)我們只能先從遠程服務(wù)器下載到我們電腦磁盤,然后再用ftp工具上傳到服務(wù)器。這樣既浪費時間又浪費精力,那不沒辦法的事。而到了Linux VPS,它則可以直接下載到服務(wù)器而不用經(jīng)過上傳這一步。wget工具體積小但功能完善,它支持斷點下載功能,同時支持FTP和HTTP下載方式,支持代理服務(wù)器和設(shè)置起來方便簡單。下面我們以實例的形式說明怎么使用wget。
wget –spider URL Spider mode enabled. Check if remote file exists. HTTP request sent, awaiting response… 200 OK Length: unspecified [text/html] Remote file exists and could contain further links, but recursion is disabled — not retrieving. 這保證了下載能在預(yù)定的時間進行,但當你給錯了一個鏈接,將會顯示如下錯誤
wget –spider url Spider mode enabled. Check if remote file exists. HTTP request sent, awaiting response… 404 Not Found Remote file does not exist — broken link!!! 你可以在以下幾種情況下使用spider參數(shù):