Insert your file ID into this URL (https://drive.google.com/uc?export=download&id=
), then surround the URL with quotes so that Bash doesn’t misinterpret the &
, like so:
wget "https://drive.google.com/uc?export=download&id=0Bz7KyqmuGsilT0J5dmRCM0ROVHc"
Reference here.
When downloading big files, Google Drive adds a security warning that breaks the script above. In that case, you can download the file using:
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=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt
(Script taken from here)