To download a specific file, right-click it and select Share.
This will open a dialog box in which you should click on the Advanced icon located in the bottom right corner.
Under Who has access, you must select On – Public on the web before clicking Save.
Copy the link for sharingExample:
https://drive.google.com/file/d/2sdiw9nSysa7_euiew832nsd_sudhsd/view?usp=sharing
Copy the file id from the URL “2sdiw9nSysa7_euiew832nsd_sudhsd” as needed while using the
wget command.

To download a small file stored on Google Drive, use the following wget command in your terminal:

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

Replace the FILEID with the file id from the download URL. Also, replace FILENAME with the name of
the file that you are downloading from Google Drive.

Downloading large files using WGET (over 100MB)

To download a large file stored on Google Drive, use the following wget command in your terminal:

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

Replace the FILEID with the file id from the download URL. Also, replace FILENAME with the name of
the file that you are downloading from Google Drive.

Alternatively, if you’re using Google Chrome as your web browser, there’s an extension called CurlWGET  
that can help you generating any wget download command with a simple click.

Was this answer helpful? 46 Users Found This Useful (150 Votes)