Skip to content

Instantly share code, notes, and snippets.

@ebta
Last active May 26, 2022 12:43
Show Gist options
  • Save ebta/c6fffe709fe36e6a4418b6348b852785 to your computer and use it in GitHub Desktop.
Save ebta/c6fffe709fe36e6a4418b6348b852785 to your computer and use it in GitHub Desktop.
Download file from Google Drive in Terminal sign wget

Example the link to be downloaded is

https://drive.google.com/file/d/Ncg6Sw4c00j1mhVl8y7oMTIZ3xkOPlV5G/view

Copy FILEID, from URL above the FILEID is : Ncg6Sw4c00j1mhVl8y7oMTIZ3xkOPlV5G If the file is not big, ex less than 25MB (download without confirmation), use this command (replace FILEID with your ID download):

wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O filename.out

If the file is big (with confirmation download), ex. more than 25 MB, using this command (watch for FILEID)

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 aspdbk-susulan.ova && rm -rf /tmp/cookies.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment