Skip to main content
Home
Drupalnesia

Main navigation

  • Home
  • Training
  • Komputer
    • Network
    • Programming
User account menu
  • Log in
Dark Mode Toggle

Breadcrumb

  1. Home

How To: wget file from Google Drive Link

By webadmin, 9 August, 2021
Google Drive

Sometimes clients give their Files/Backups of Dupal by sharing a Google Drive Link, when you wget the given link then you will get the link only, not the file. Look at this link:

https://drive.google.com/file/d/FILEID/view?usp=drivesdk

To get the file for simple/smaller file then use:

wget -c -t10 --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O NEWFILENAME

For large file:

wget -c -t 10 --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O NEWFILENAME && rm -rf /tmp/cookies.txt

Option -c for wget is very important, this will continue to save to same file if you re-download while wget broken, especially for large file.

HTH. (WW)

Tags

  • google drive
  • wget

Kontak Kami

Need Drupal support? (Butuh bantuan Drupal?)

  • WA: 082 111 978 168
  • https://www.drupal.org/u/drupalnesia
  • Office: Mangga Dua Square - Jakarta Utara 14420

Recent content

  • Drupalnesia (a.k.a Drupalisme)
    3 years ago
  • [SOLVED] Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2
    3 years ago

Pagination

  • Previous page
  • 2
RSS feed
Powered by Drupal