Skip to content

Instantly share code, notes, and snippets.

@aakashb95
Created January 19, 2021 13:28
Show Gist options
  • Save aakashb95/364aa93e918f3734085093548c707a28 to your computer and use it in GitHub Desktop.
Save aakashb95/364aa93e918f3734085093548c707a28 to your computer and use it in GitHub Desktop.
Download shared folder from google drive using terminal
#!/bin/bash
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}
## run chmod +x gdrive_folder_download.sh
## ./gdrive_folder_download.sh <fileID> <fileName>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment