wget
नेटवर्क
इस्तेमाल
wget [options] <url>किसी URL को फ़ाइल में डाउनलोड करता है और रीडायरेक्ट अपने आप निभाता है; यही curl से अंतर है, जो कहे बिना टर्मिनल पर छापता है — और macOS में wget नहीं आता।
आम विकल्प
| विकल्प | अर्थ |
|---|---|
| -O <file> | Choose the output name; -O - writes to stdout like curl does. |
| -c | Continue a partly downloaded file instead of starting over. |
| -q | Quiet. Pair with -O - to pipe the body somewhere. |
| -P <dir> | Put downloads into a directory. |
| -r -np -k | Recursive mirror, never climb above the start URL, rewrite links for local reading. |
| --limit-rate=1m | Cap the bandwidth so the download does not saturate the line. |
| -N | Only fetch if the remote file is newer than the local copy. |
उदाहरण
wget -c https://example.com/big.isoResume a large download after the connection dropped.
wget -r -np -k https://example.com/docs/Mirror a documentation tree for offline reading.
wget -qO- https://example.com | headBehave like curl and print to the terminal.
कनेक्शन न बने तो ये बताते हैं कि बात कहाँ तक पहुँची — नाम हल नहीं हुआ, रास्ता नहीं, या पोर्ट बंद है।
कैसे पढ़ें
- बड़े कोष्ठक [ ] उस हिस्से को दिखाते हैं जिसे छोड़ा जा सकता है।
- तीन बिंदु … का मतलब है एक से ज़्यादा दिए जा सकते हैं।
- विकल्पों में बड़े-छोटे अक्षर मायने रखते हैं — कुछ कमांड में -r और -R अलग काम करते हैं।
आम सवाल
Q. wget क्या करता है?
किसी URL को फ़ाइल में डाउनलोड करता है और रीडायरेक्ट अपने आप निभाता है; यही curl से अंतर है, जो कहे बिना टर्मिनल पर छापता है — और macOS में wget नहीं आता।
Q. इसे कैसे लिखें?
wget [options] <url> — बड़े कोष्ठक वह हिस्सा दिखाते हैं जो छोड़ा जा सकता है।
Q. कितने विकल्प जानने लायक़ हैं?
यहाँ 7 दिए हैं; पूरी सूची man wget में है। यह कमांड नेटवर्क में आती है।
मिलती-जुलती कमांड
man पेज: man wget