دستور wget
wget ابزار خط فرمان لینوکس برای دانلود فایل از اینترنت است. با wget میتوانید فایلها، صفحات وب و حتی کل سایتها را دانلود کنید.
دانلود ساده
wget https://example.com/file.zip
دانلود با نام سفارشی
wget -O myfile.zip https://example.com/file.zip
ادامه دانلود قطعشده
wget -c https://example.com/largefile.zip
دانلود پسزمینه
wget -b https://example.com/file.zip
# بررسی وضعیت
tail -f wget-log
محدودیت سرعت
wget --limit-rate=500k https://example.com/file.zip
دانلود چندین فایل
# از فایل لیست
wget -i urls.txt
# چندین URL
wget https://example.com/file1.zip https://example.com/file2.zip
دانلود با احراز هویت
wget --user=username --password=password https://example.com/protected/file.zip
Mirror سایت
wget --mirror --convert-links --page-requisites https://example.com/
دانلود بازگشتی
wget -r -l 2 https://example.com/directory/
پارامترهای مفید
-q بیصدا. -v جزئیات. --no-check-certificate بدون بررسی SSL. -P /path/ مسیر ذخیره. -N فقط فایلهای جدید.
جایگزین: curl
curl -O https://example.com/file.zip
curl -L -o file.zip https://example.com/file.zip
سرور مجازی با SSH و wget. کانفیگ سرور شامل ابزارهای خط فرمان.