2022年1月4日 星期二

用curl指令下載GitHub的檔案

放在GitHub上面的檔案,用wget即使開啟了--no-check-certificate--content-disposition,也有可能抓不下來。這是因為GitHub可能把檔案放到不是連結看到的地方,連結所在的檔案存放的是要轉往的位址,這時候下載就要用到curl了:

  • curl -LJO  https://github.com/samtools/samtools/releases/download/1.14/samtools-1.14.tar.bz2

如此就能順利下載samtools-1.14.tar.bz2,參數意義如下:

  • -L:--location, (HTTP/HTTPS) If the server reports that the requested page has moved to a  different  location  (indicated  with  a  Location: header and a 3XX response code), this option will make curl redo the request on the new place.
  • -J:--remote-header-name, (HTTP) This option tells the -O, --remote-name option to use the server-specified  Content-Disposition filename instead of extracting a filename from the URL.
  • -O:--remote-name, Write output to a local file named like the remote file we get. (Only the file part of  the remote file is used, the path is cut off.)


參考資料

_EOF_

brutalist penthouse open living room, big windows, showing city landscape on background, minimalist architecture, minimalist furniture, octane render, high quality, 8 k, post production

Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 4220395071, Size: 512x256, Model hash: fc2511737a, Model: chilloutmix_NiPrunedFp32Fix, Version: v1.6.1

Time taken: 1 min. 43.0 sec.
A: 1.73 GB, R: 2.20 GB, Sys: 2.0/2 GB (100.0%)

沒有留言:

張貼留言