20

مرکز آموزش نت آرام

hosting image
10-examples-for-wget-command-in-linux

10 مثال دستور wget (دانلود فایل لینوکس) در لینوکس

[fusion_builder_container background_color=”” background_image=”” background_parallax=”none” enable_mobile=”no” parallax_speed=”0.3″ background_repeat=”no-repeat” background_position=”left top” video_url=”” video_aspect_ratio=”16:9″ video_webm=”” video_mp4=”” video_ogv=”” video_preview_image=”” overlay_color=”” overlay_opacity=”0.5″ video_mute=”yes” video_loop=”yes” fade=”no” border_size=”0px” border_color=”” border_style=”” padding_top=”20″ padding_bottom=”20″ padding_left=”0″ padding_right=”0″ hundred_percent=”no” equal_height_columns=”no” hide_on_mobile=”no” menu_anchor=”” class=”” id=””][fusion_builder_row][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_text]

دستور wget یکی از محبوب ترین و پرکاربرد ترین دستور های لینوکس است. wget یک دستور دریافت فایل از شبکه جهانی اینترنت می باشد که امکان دریافت از پروتکل های HTTP و HTTPS و FTP را دارد. ابزار دستور wget به صورت رایگان تحت مجوز GNU GPL لایسنس قابل دریافت است. این ابزار می تواند روی هر سیستم شبه یونیکس از جمله ویندوز و Mac نصب کرد. wget یک دستور non-interactive می باشد. یکی از ویژگی های دستور wget قدرتمند بودن آن است ، wget می تواند در شبکه های کند یا ناپیدار بدون مشکل کار کند. دستور wget به طور خودکار شروع به دانلود می کند و در زمان قطع شبکه ، فایل تا قسمت دریافت شده باقی می ماند و پس از وصل شدن ادامه آن را دانلود می کند آن فایل را تا زمانی که به طور کامل دریافت نکند نگهداری می کند.

۱۰ مثال دستور wget در لینوکس

با دستور زیر ابتدا چک کنید که آیا دستور wget روی لینوکس شما نصب شده است یا خیر ؟

توجه : در هر کادر دستوری ، رنگ مشکی و رنگ آبی خروجی دستور ( پاسخ دستور ) می باشد.

[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

rpm -qa wget

wget-1.12-1.4.el6.i686

[/fusion_tagline_box][fusion_text]لطفا در صورتی که wget روی سیستم عامل شما نصب نیست آن را به وسیله yum نصب کنید و یا پکیج باینری آن را از لینک http://ftp.gnu.org/gnu/wget/ دریافت کنید.[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

yum -y install wget

[/fusion_tagline_box][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_title size=”3″ content_align=”left” style_type=”default” sep_color=”” class=”” id=””]1. دانلود یک فایل[/fusion_title][fusion_text]این دستور یک فایل را با یک لینک مشخص در دایرکتوری جاری دانلود می کند و میزان سرعت ، پیشرفت دانلود ، تاریخ و زمان را نمایش می دهد.[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

wget http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz

–2012-10-02 11:28:30– http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz
Resolving ftp.gnu.org… 208.118.235.20, 2001:4830:134:3::b
Connecting to ftp.gnu.org|208.118.235.20|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 446966 (436K) [application/x-gzip]
Saving to: wget-1.5.3.tar.gz
100%[<==================================] 446,966 60.0K/s in 7.4s
2012-10-02 11:28:38 (58.9 KB/s) – wget-1.5.3.tar.gz

[/fusion_tagline_box][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_title size=”3″ content_align=”left” style_type=”default” sep_color=”” class=”” id=””]2. دانلود یک فایل و ذخیره آن با نام مشخص
[/fusion_title][fusion_text]از -O برای ذخیره فایل دانلودی با نام مشخص استفاده کنید برای مثال من در این دستور فایل را با نام wget.zip ذخیره می کنم.[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

# wget -O wget.zip http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz

–2012-10-02 11:55:54– http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz
Resolving ftp.gnu.org… 208.118.235.20, 2001:4830:134:3::b
Connecting to ftp.gnu.org|208.118.235.20|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 446966 (436K) [application/x-gzip]
Saving to: wget.zip
100%[=============================>] 446,966 60.0K/s in 7.5s
2012-10-02 11:56:02 (58.5 KB/s) – wget.zip

[/fusion_tagline_box][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_title size=”3″ content_align=”left” style_type=”default” sep_color=”” class=”” id=””]3. دانلود چند فایل از پروتکل های http و ftp
[/fusion_title][fusion_text]در اینجا ما مشاهده می کنیم که چگونه چند فایل از پروتکل های wget و ftp به وسیله دستور wget دانلود می شود.[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

# wget http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz ftp://ftp.gnu.org/gnu/wget/wget-1.10.1.tar.gz.sig

–2012-10-02 12:11:16– http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz
Resolving ftp.gnu.org… 208.118.235.20, 2001:4830:134:3::b
Connecting to ftp.gnu.org|208.118.235.20|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 446966 (436K) [application/x-gzip]
Saving to: wget-1.5.3.tar.gz

100%[==========================================>] 446,966 56.7K/s in 7.6s

2012-10-02 12:11:29 (57.1 KB/s) – wget-1.5.3.tar.gz

–2012-10-02 12:11:29– ftp://ftp.gnu.org/gnu/wget/wget-1.10.1.tar.gz.sig
=> wget-1.10.1.tar.gz.sig

Logging in as anonymous … Logged in!
==> SYST … done. ==> PWD … done.
==> TYPE I … done. ==> CWD (1) /gnu/wget … done.
==> SIZE wget-1.10.1.tar.gz.sig … 65
==> PASV … done. ==> RETR wget-1.10.1.tar.gz.sig … done.
Length: 65 (unauthoritative)

100%[===================================================================================>] 65 –.-K/s in 0s

2012-10-02 12:11:33 (2.66 MB/s) – wget-1.10.1.tar.gz.sig

FINISHED –2012-10-02 12:11:33–
Downloaded: 2 files, 437K in 7.6s (57.1 KB/s)

[/fusion_tagline_box][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_title size=”3″ content_align=”left” style_type=”default” sep_color=”” class=”” id=””]4. دانلود از لینک های داخل یک فایل
[/fusion_title][fusion_text]شما می توانید تمام لینک ها را داخل یک فایل text قرار دهید و سپس با استفاده از -i تمام لینک های موجود در فایل متنی را دانلود نمایید.[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

wget -i /wget/tmp.txt

–2012-10-02 12:34:12– http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz ftp://ftp.gnu.org/gnu/wget/wget-1.10.1.tar.gz.sig
Resolving ftp.gnu.org… 208.118.235.20, 2001:4830:134:3::b
Connecting to ftp.gnu.org|208.118.235.20|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 446966 (436K) [application/x-gzip]
Saving to: wget-1.10.1.tar.gz.sig

100%[=====================================>] 446,966 35.0K/s in 10s

2012-10-02 12:34:23 (42.7 KB/s) – wget-1.10.1.tar.gz.sig

–2012-10-02 12:34:23– http://mirrors.hns.net.in/centos/6.3/isos/x86_64/CentOS-6.3-x86_64-LiveDVD.iso
Resolving mirrors.hns.net.in… 111.91.91.34, 2401:4800::111:91:91:34
Connecting to mirrors.hns.net.in|111.91.91.34|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1761607680 (1.6G) [application/octet-stream]
Saving to: CentOS-6.3-x86_64-LiveDVD.iso

45%[================== ] 1,262,000 51.6K/s eta 8h 17m

[/fusion_tagline_box][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_title size=”3″ content_align=”left” style_type=”default” sep_color=”” class=”” id=””]5. ادامه دانلود تمام نشده
[/fusion_title][fusion_text]

گاهی اوقات در دانلود فایل های حجیم و بزرگ مشکلی پیش می آید و شما می توانید از -c برای ادامه دانلود استفاده نمایید ، توجه کنید که در صورت عدم استفاده از سوئیچ -c ، سیستم اقدام به دانلود جدید می کند و به اخر فایلی که ذخیره می شود .1 اضافه می کند. بنابراین تمرین خوبی است برای ادامه دانلود فایل ها از wget -c استفاده کنید.

[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

wget -c http://mirrors.hns.net.in/centos/6.3/isos/x86_64/CentOS-6.3-x86_64-LiveDVD.iso

–2012-10-02 12:46:57– http://mirrors.hns.net.in/centos/6.3/isos/x86_64/CentOS-6.3-x86_64-LiveDVD.iso
Resolving mirrors.hns.net.in… 111.91.91.34, 2401:4800::111:91:91:34
Connecting to mirrors.hns.net.in|111.91.91.34|:80… connected.
HTTP request sent, awaiting response… 206 Partial Content
Length: 1761607680 (1.6G), 1758132697 (1.6G) remaining [application/octet-stream]
Saving to: CentOS-6.3-x86_64-LiveDVD.iso

51% [================================== ] 3,877,262 47.0K/s eta 10h 27m ^

[/fusion_tagline_box][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_title size=”3″ content_align=”left” style_type=”default” sep_color=”” class=”” id=””]6. دریافت فایل با 0.1 اضافه در نام فایل
[/fusion_title][fusion_text]

هنگامی که شما دانلود را بدون استفاده از -c آغاز می کنید در صورت وجود فایل از قبل wget به انتهای فایل دانلودی .1 اضافه می کند و در صورت وجود .1 نیز .2 را اضافه می کند.

[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

wget http://mirrors.hns.net.in/centos/6.3/isos/x86_64/CentOS-6.3-x86_64-LiveDVD.iso

–2012-10-02 12:50:49–  http://mirrors.hns.net.in/centos/6.3/isos/x86_64/CentOS-6.3-x86_64-LiveDVD.iso
Resolving mirrors.hns.net.in… 111.91.91.34, 2401:4800::111:91:91:34
Connecting to mirrors.hns.net.in|111.91.91.34|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1761607680 (1.6G) [application/octet-stream]
Saving to: CentOS-6.3-x86_64-LiveDVD.iso.1

 18% [===         ] 172,436     59.2K/s  

[/fusion_tagline_box][fusion_text]

شما با دستور زیر می توانید .1 در انتهای فایل را مشاهده نمایید :

[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

ls -l CentOS*

-rw-r–r–. 1 root root 3877262 Oct 2 12:47 CentOS-6.3-x86_64-LiveDVD.iso
-rw-r–r–. 1 root root 181004 Oct 2 12:50 CentOS-6.3-x86_64-LiveDVD.iso.1

[/fusion_tagline_box][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_title size=”3″ content_align=”left” style_type=”default” sep_color=”” class=”” id=””]7. دانلود فایل ها در Background
[/fusion_title][fusion_text]

با استفاده از سوئیج -b شما می توانید دانلود را در background آغاز کنید و بلافاصله پس از شروع دانلود لاگ آن در آدرس /wget/log.txt ذخیره می شود.

[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

wget -b /wget/log.txt ftp://ftp.iinet.net.au/debian/debian-cd/6.0.5/i386/iso-dvd/debian-6.0.5-i386-DVD-1.iso

Continuing in background, pid 3550

[/fusion_tagline_box][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_title size=”3″ content_align=”left” style_type=”default” sep_color=”” class=”” id=””]8. محدود کردن سرعت دانلود فایل
[/fusion_title][fusion_text]

با استفاده از تنظیم –limit-rate=100k سرعت فایل دریافتی شما به حداکثر 100 کیلوبایت محدود می شود و فایل لاگ در مسیر  /wget/log.txt ایجاد می شود.

[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

wget -c –limit-rate=100k /wget/log.txt ftp://ftp.iinet.net.au/debian/debian-cd/6.0.5/i386/iso-dvd/debian-6.0.5-i386-DVD-1.iso

/wget/log.txt: Scheme missing.
–2012-10-02 13:16:21– ftp://ftp.iinet.net.au/debian/debian-cd/6.0.5/i386/iso-dvd/debian-6.0.5-i386-DVD-1.iso
=> debian-6.0.5-i386-DVD-1.iso
esolving ftp.iinet.net.au… 203.0.178.32
Connecting to ftp.iinet.net.au|203.0.178.32|:21… connected.
Logging in as anonymous … Logged in!
==> SYST … done. ==> PWD … done.
==> TYPE I … done. ==> CWD (1) /debian/debian-cd/6.0.5/i386/iso-dvd … done.
==> SIZE debian-6.0.5-i386-DVD-1.iso … 4691312640
==> PASV … done. ==> REST 2825236 … done.
==> RETR debian-6.0.5-i386-DVD-1.iso … done.
Length: 4688487404 (4.4G), 4685662168 (4.4G) remaining (unauthoritative)

0% [    ] 3,372,160 35.5K/s eta 28h 39m

[/fusion_tagline_box][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_title size=”3″ content_align=”left” style_type=”default” sep_color=”” class=”” id=””]9. دانلود از ftp و http با استفاده از نام کاربری و رمز عبور
[/fusion_title][fusion_text]

گاهی اوقات دانلود از ftp یا http نیاز به وارد کردن نام کاربری و رمز عبور می باشد شما می توانید از سوئیچ –http-user=username و –http-password=password یا –ftp-user=username و –ftp-password=password استفاده نمایید.

[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

wget –http-user=narad –http-password=password http://mirrors.hns.net.in/centos/6.3/isos/x86_64/CentOS-6.3-x86_64-LiveDVD.iso

[/fusion_tagline_box][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

wget –ftp-user=narad –ftp-password=password ftp://ftp.iinet.net.au/debian/debian-cd/6.0.5/i386/iso-dvd/debian-6.0.5-i386-DVD-1.iso

[/fusion_tagline_box][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_title size=”3″ content_align=”left” style_type=”default” sep_color=”” class=”” id=””]10. مشاهده نسخه نصب شده دستور wget و راهنمای دستور
[/fusion_title][fusion_text]

با وارد کردن سوئیچ –version و –help شما می توانید نسخه نصب شده و راهنمای دستور را مشاهده فرمایید.

[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][fusion_tagline_box backgroundcolor=”” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]

wget –version

wget –help

[/fusion_tagline_box][fusion_text]

منبع : Tecmint

در این آموزش در مورد دستور wget و انواع سوئیچ آن برای کارهای روزمره و اداری توضیح دادیم. لطفا در صورتی که بنده قسمتی را فراموش کردم بنویسم یا مشکل خاصی داشتید در قسمت نظرات آن را برای بنده ارسال کنید ، امیدوارم بتونم کمکتون کنم.

[/fusion_text][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]

Leave a Reply

نشانی ایمیل شما منتشر نخواهد شد.