Skip to content

Instantly share code, notes, and snippets.

@NaxAlpha
Created February 10, 2019 08:55
Show Gist options
  • Select an option

  • Save NaxAlpha/41b82102964ed15c8b74e7b247b83d06 to your computer and use it in GitHub Desktop.

Select an option

Save NaxAlpha/41b82102964ed15c8b74e7b247b83d06 to your computer and use it in GitHub Desktop.
Download Large File from Google Drive: https://stackoverflow.com/a/49444877/3139808
#!/bin/bash
# Usage bash gdrive-download.sh <file_id> <file_name>
fileid="$1"
filename="$2"
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
rm cookie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment