2013-04-28 9 views
16

साथ GitHub परियोजना डाउनलोड कर सकते हैं नहीं मैं इस GitHub परियोजना लिंक से परियोजना फ़ाइलों को डाउनलोड करने "कर्ल -तो" कमांड का प्रयोग किया: http://github.com/ziyaddin/xampp/archive/master.zipकर्ल आदेश

लेकिन, मैं डाउनलोड नहीं कर सका। http://cloud.github.com/downloads/pivotal/jasmine/jasmine-standalone-1.3.1.zip

मुझे लगता है कि यह है, क्योंकि यह cloud.github.com में है:

Archive: /home/ziyaddin/Desktop/master.zip 
[/home/ziyaddin/Desktop/master.zip] End-of-central-directory 
signature not found. Either this file is not a zipfile, or it 
constitutes one disk of a multi-part archive. In the latter case 
the central directory and zipfile comment will be found on the last 
disk(s) of this archive. zipinfo: cannot find zipfile directory in 
one of /home/ziyaddin/Desktop/master.zip or 
      /home/ziyaddin/Desktop/master.zip.zip, and cannot find 
/home/ziyaddin/Desktop/master.zip.ZIP, period. 

लेकिन मैं कर्ल कमांड के साथ इस लिंक डाउनलोड कर सकते हैं: वहाँ त्रुटि हो गई और कहता है कि है। मैं जानना चाहता हूं कि मैं कर्ल कमांड के साथ पहले लिंक से कैसे डाउनलोड कर सकता हूं?

उत्तर

34
 
$ curl -LOk https://github.com/ziyaddin/xampp/archive/master.zip 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 119 100 119 0  0 375  0 --:--:-- --:--:-- --:--:-- 388 
    0  0 0 1706 0  0 1382  0 --:--:-- 0:00:01 --:--:-- 333k 
  • आप आप अपने प्रमाणपत्र फ़ाइल
+0

ठीक काम करता है! आपका बहुत बहुत धन्यवाद! –

+0

क्या मैं गंतव्य फ़ोल्डर में फ़ाइल को सहेजने के लिए इस वर्तमान कमांड का उपयोग कर सकता हूं? मैंने जो गंतव्य फ़ोल्डर लिखा है उसे सहेजने के लिए मुझे क्या लिखना चाहिए? –

+0

क्या एक अच्छा जवाब है। –

2
 
$ curl -I http://github.com/ziyaddin/xampp/archive/master.zip 
HTTP/1.1 301 Moved Permanently 
Server: GitHub.com 
Date: Sun, 28 Apr 2013 09:24:53 GMT 
Content-Type: text/html 
Content-Length: 178 
Connection: close 
Location: https://github.com/ziyaddin/xampp/archive/master.zip 
Vary: Accept-Encoding 

याद आ रही है का उपयोग https://

  • आप -L का उपयोग पुनर्निर्देश
  • आप -k का उपयोग करना चाहिए पालन करने के लिए करना चाहिए ... इसलिए यदि आप HTTP रीडायरेक्ट का पालन करना चाहते हैं तो -L का उपयोग करने की आवश्यकता है। या सिर्फ स्टीवन पैसा के जवाब पढ़ें ...

  • +0

    धन्यवाद, डैनियल! –

    4

    तुम भी डाउनलोड कर सकते हैं एक tarball (* .tar.gz) के साथ:

    curl -LkSs https://api.github.com/repos/ziyaddin/xampp/tarball -o master.tar.gz 
    

    या आप का उपयोग करता है, तो -O आप, फ़ाइल नाम को छोड़ सकते हैं लेकिन फिर आपकी सहेजी गई ".tar.gz" फ़ाइल को डिफ़ॉल्ट रूप से "टैरबॉल" नाम दिया गया है, इसलिए आपको इसका नाम बदलना होगा और ".tar.gz" फ़ाइल टाइप पोस्टफिक्स जोड़ना होगा। तो ऊपर के रूप में (लोअरकेस) -o का उपयोग करें। बाकी:

    • Ss - साइलेंट मोड उपयोग करें, लेकिन, त्रुटियों को दिखाने यदि कोई
    • k - टीएलएस प्रमाणपत्र की जाँच के बिना एक असुरक्षित SSL कनेक्शन का उपयोग।