Skip to content

Instantly share code, notes, and snippets.

@halhenke
Created July 8, 2018 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halhenke/0721a3ce27674e4037784506f35f42ea to your computer and use it in GitHub Desktop.
Save halhenke/0721a3ce27674e4037784506f35f42ea to your computer and use it in GitHub Desktop.
Download a file from Google Drive - Bash Script
#!/bin/bash
# fileid="### file id ###"
fileid="1hEG-GmMrvp--hWRU41RMBLB3gL-IdXs9"
filename="ILSVRC2014_devkit.tar"
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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment