2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

github上のファイルをコマンドラインから取得する

Posted at

github上のファイルを取得する場合、GUI上でボタンクリックしても取得可能だが、コマンドラインから取得したい場合がある。

方法

  • テキストファイルの場合は、rawボタンをクリックするとrawデータが表示されるので、そのURLを以下のようにcurlで指定すれば良い。
  • バイナリデータの場合は、view rawをクリックして、そのURLを以下のようにcurlで指定すれば良い。(Macの場合は自動ダウンロードが始まるが、ダウンロード一覧から)

(例)
https://raw.githubusercontent.com/xxx/xxxのバイナリをfilenameという名前で取得する場合

curl --output filename https://raw.githubusercontent.com/xxx/xxx

参考

githubからファイルを直接ダウンロード

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?