19

I have discovered the wget and this command is awesome.

In my tests, I've tried to download an entire folder from a Github repository, but the folder does not download like a folder, the download file is an archive with no extension.

Example:

wget https://github.com/peachananr/onepage-scroll/tree/master/Demo

Note: I want the files in this folder.

There's a way?

Thanks!

shahensha
  • 2,051
  • 4
  • 29
  • 41
reidark
  • 870
  • 4
  • 11
  • 22
  • Github makes available a zip file format, on any repository's page click the "Clone or Download" link and copy the link of the "Zip file" button. e.g. https://github.com/peachananr/onepage-scroll/archive/master.zip – kristianp May 03 '19 at 04:44
  • Try: `wget -O - https://github.com/peachananr/onepage-scroll/archive/master.tar.gz | tar xz --strip=2 "onepage-scroll-master/Demo"` . See more examples: https://unix.stackexchange.com/a/588115/43233 – Noam Manos May 21 '20 at 12:59

1 Answers1

9

The file that wget downloaded is actually an html page that is the "view" that you see when you access the URL (that you had given).

The github webpage is just a "frontend" to the git code. To access the code, you need to either access the github link via GIT, or you can download the various released versions of the software from the Releases page of onepage-scroll

That said, you can take a look at this: Download a single folder or directory from a GitHub repo

Hope this helps.

Community
  • 1
  • 1