Downloading a whole website via Terminal in Ubuntu | openGLUG

Pages

Monday 1 April 2013

Downloading a whole website via Terminal in Ubuntu



In this tutorial i am going to explain how to download a whole website into your computer. After doing the steps i explained below you can use the downloaded website offline!!.  That also without any third-party software.
To download the website and to convert it to offline edition, i am going to use a commandline utility called 'wget'.

These are the steps to download an offline edition of any website.
  1. Open the terminal
  2. Now enter the following command.
                        wget --mirror -p --convert-links -p destination_path website_URL
 
Now i will tell what those words mean.
  • wget - This is the utility which does all this great stuff
  • --mirror - Turns on options suitable for mirroring
  • -p - Instructs to download all the files required to the page to load properly
  • --convert-links - Converts all the links in the each web pages to the offline path so that offline navigation between pages is possible.
  • destination_path - This is the local path where the downloaded files should be stored. When you are executing the actual command, you have to replace this by a local path. (i.e. Path to any folder that exist in your computer.)
  • website_URL - This is the web site address.
So now you know the general command. If you want an example here it is.
                    wget --mirror -p --convert-links -p /home/user/Documents http://en.wikipedia.org
The above command will download Wikipedia frontpage along with the pages linked from the frontpage and all the downloaded files will be stored in the Documents/en.wikipedia.org folder.
                        

1 comment:

  1. Most of the time people get disappointed to seen the concept of blocked websites and they did not know how to start it. but I have a simple and smart concept to start just single just click and open any blocked site very easily
    DownloadForAll UK proxy

    ReplyDelete