March 10

How to Download single file from GitHub in Terminal?

  • Click the file name in a GitHub
  • Click Raw to display the file contents.
  • You will see the file’s url link

 

In the command line, run

curl -OL https://raw.githubusercontent.com////path/to/file  (this is the file’s url link)

O means that curl downloads the content
L means that curl follows the redirection


Posted March 10, 2021 by Ray in category "Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.