Skip to content

Instantly share code, notes, and snippets.

@hershkoy
Created December 9, 2020 08:27
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save hershkoy/159d43c92f63b67d3025c93cb3e2fd2a to your computer and use it in GitHub Desktop.
Save hershkoy/159d43c92f63b67d3025c93cb3e2fd2a to your computer and use it in GitHub Desktop.
Download large file from Google Drive (2020)
#!/bin/bash
if [ $# != 2 ]; then
echo "Usage: googledown.sh ID save_name"
exit 0
fi
confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id='$1 -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')
echo $confirm
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$confirm&id=$1" -O $2 && rm -rf /tmp/cookies.txt
@hershkoy
Copy link
Author

If you have issues with the method above, try this one:
https://www.quora.com/How-do-I-download-a-very-large-file-from-Google-Drive/answer/Shane-F-Carr
worked for me with a 22Gb file

@ssi-anik
Copy link

It's working per file. <3

@ssi-anik
Copy link

It's working per file. <3

And it's now not working for some reason :3

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