Linux command
gdown 命令
网络
复制后可按需替换文件名、目录或参数。
常用示例
Download from Google
gdown [https://drive.google.com/uc?id=FILE_ID]
Download by ID
gdown [file_id]
Download folder
gdown --folder [https://drive.google.com/drive/folders/FOLDER_ID]
Output to file
gdown [file_id] -O [output.zip]
Fuzzy search
gdown --fuzzy [https://drive.google.com/...]
说明
gdown is a command-line tool for downloading files and folders from Google Drive, providing wget/curl-like functionality specifically for Drive URLs. It automatically handles Google Drive's download mechanisms, including the virus scan confirmation step that large files require, making automated downloads possible. The tool intelligently extracts file IDs from various Google Drive URL formats, whether they're sharing links, direct file URLs, or folder URLs. It can download individual files, entire folders recursively, and works with both public and shared links without requiring OAuth authentication for public content. gdown is particularly popular in machine learning and data science workflows, where large datasets and model weights are frequently shared via Google Drive. It enables reproducible research pipelines and automated data fetching in scripts. The fuzzy matching option helps when URLs are embedded in redirects or formatted unusually. For files requiring authentication or private Drive content, gdown's functionality is limited. It works best with publicly accessible shared files and folders, making it ideal for open datasets and model distributions.
参数
- -O _FILE_, --output _FILE_
- Output filename or directory (for folders).
- --folder
- Download an entire folder recursively (limited to ~50 files per folder).
- --fuzzy
- Extract the file ID from non-standard or redirecting URLs.
- --id
- Treat the positional argument strictly as a file ID (deprecated: now inferred automatically).
- --continue, -c
- Resume a partially downloaded file.
- --format _FMT_
- Export format for Google Docs/Sheets/Slides (e.g. docx, xlsx, pptx, pdf).
- --speed _RATE_
- Limit download speed (e.g. `10MB`).
- --proxy _URL_
- Download through an HTTP/HTTPS proxy.
- --no-cookies
- Ignore the cookie cache at `~/.cache/gdown/cookies.txt`.
- --no-check-certificate
- Skip TLS certificate verification.
- --user-agent _STRING_
- Override the default User-Agent header.
- --remaining-ok
- Continue past the 50-file limit when downloading folders.
- -q, --quiet
- Suppress progress and informational output.
- -V, --version
- Show version information.
- -h, --help
- Display help information.
FAQ
What is the gdown command used for?
gdown is a command-line tool for downloading files and folders from Google Drive, providing wget/curl-like functionality specifically for Drive URLs. It automatically handles Google Drive's download mechanisms, including the virus scan confirmation step that large files require, making automated downloads possible. The tool intelligently extracts file IDs from various Google Drive URL formats, whether they're sharing links, direct file URLs, or folder URLs. It can download individual files, entire folders recursively, and works with both public and shared links without requiring OAuth authentication for public content. gdown is particularly popular in machine learning and data science workflows, where large datasets and model weights are frequently shared via Google Drive. It enables reproducible research pipelines and automated data fetching in scripts. The fuzzy matching option helps when URLs are embedded in redirects or formatted unusually. For files requiring authentication or private Drive content, gdown's functionality is limited. It works best with publicly accessible shared files and folders, making it ideal for open datasets and model distributions.
How do I run a basic gdown example?
Run `gdown [https://drive.google.com/uc?id=FILE_ID]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -O _FILE_, --output _FILE_ do in gdown?
Output filename or directory (for folders).