Created
April 8, 2019 02:45
-
-
Save kwbtdisk/153f123c36201b6fb3e3c570421b93e8 to your computer and use it in GitHub Desktop.
Download a large file on google drive with curl on linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FILE_ID="xxxxxxxxxxxxxxxxxxxx" | |
curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=${FILE_ID}" > /dev/null | |
CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)" | |
curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=${FILE_ID}" -o archive.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment