Skip to content

Instantly share code, notes, and snippets.

@zinntikumugai
Created October 1, 2018 16:54
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 zinntikumugai/e0ce10171aba705d666e2012a4c20d2e to your computer and use it in GitHub Desktop.
Save zinntikumugai/e0ce10171aba705d666e2012a4c20d2e to your computer and use it in GitHub Desktop.

Google Driveの大きいファイルを直接ダウンロードするコマンド
予め公開範囲をリンクを知っているユーザー全員にしておく(特にG Suiteは手動で変更する必要あり)

FILE_ID=
FILE_NAME=
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 ${FILE_NAME}

https://qiita.com/namakemono/items/c963e75e0af3f7eed732

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment