Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pavly-gerges/90074eee5fc0c686020b705eb9b6783a to your computer and use it in GitHub Desktop.
Save pavly-gerges/90074eee5fc0c686020b705eb9b6783a to your computer and use it in GitHub Desktop.
Download Google Drive files with WGET

How to download files from Google Drive with WGET

Step 1. Get the ID of the file to download

  1. Get a shareable link from Google Drive by right-clicking the file and selecting Get Shareable Link.

  2. Examine the link to get the file's ID. Example:

    https://docs.google.com/open?id=[ID]

Step 2. Download the file with WGET

  1. Build the download URL using the ID obtained in Step 1. Example:

    https://drive.google.com/uc?export=download&id=[ID]

  2. Run WGET with the URL. Usage: wget [OPTION]... [URL].... Example:

    wget -O [filename] --no-check-certificate -r 'https://drive.google.com/uc?export=download&id=[ID]'

      Options used:
      -O, --output-document=FILE  writes document to FILE
      --no-check-certificate      don't validate the server's certificate
      -r                          recursive
    

These instructions were inspired by the Gist and comments at https://gist.github.com/iamtekeste/3cdfd0366ebfd2c0d805

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment