Linux wget是一個下載文件的工具,它用在命令行下。對于Linux用戶是必不可少的工具,尤其對于網絡管理員,經常要下載一些軟件或從遠程服務器恢復備份到本地服務器。如果我們使用虛擬主機,處理這樣的事務我們只能先從遠程服務器下載到我們電腦磁盤,然后再用ftp工具上傳到服務器。這樣既浪費時間又浪費精力,那不沒辦法的事。而到了Linux VPS,它則可以直接下載到服務器而不用經過上傳這一步。wget工具體積小但功能完善,它支持斷點下載功能,同時支持FTP和HTTP下載方式,支持代理服務器和設置起來方便簡單。下面我們以實例的形式說明怎么使用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. 這保證了下載能在預定的時間進行,但當你給錯了一個鏈接,將會顯示如下錯誤
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參數: