Skip to content

Instantly share code, notes, and snippets.

@christyjacob4
Last active February 24, 2020 22:49
Show Gist options
  • Save christyjacob4/0fa9cc3db08637486490730a085cf8c1 to your computer and use it in GitHub Desktop.
Save christyjacob4/0fa9cc3db08637486490730a085cf8c1 to your computer and use it in GitHub Desktop.
bash script to download a large gdrive file (>100MB) using wget.
wget --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='$1 -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id="$1 -O $2 && rm -rf /tmp/cookies.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment