Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using wget to download an entire folder from github [closed]

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!

like image 630
reidark Avatar asked Aug 19 '14 01:08

reidark


People also ask

Can I download a whole folder from GitHub?

GitHub User InterfaceThere's a download button on the repository's homepage. Of course, this downloads the entire repo, after which you would need to unzip the download and then manually drag out the specific folder you need.

How do I download all files in a folder using wget?

When you use -r or –recursive option with wget, it will download all files & folders and recursively, without any filters. If you don't want to download specific files or folders, you exclude them using -R or –reject option, followed by the file or folder name to be excluded.


1 Answers

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.

like image 76
Lakshminarayanan K. Avatar answered Oct 10 '22 20:10

Lakshminarayanan K.