gdown with the /go/gdown Command

/go/gdown installs gdown, a Python tool that downloads files and folders from Google Drive, so you can pull large backups, archives, or site files onto your server without a browser. The command itself does not download anything. It: Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Install gdown
/go/gdown

# Then download a file by its Google Drive ID
gdown --id <file_id>

Options

None.

The options below belong to the gdown tool that this command installs, not to /go/gdown itself.

Option Purpose
--id <file_id> Download a file by its Google Drive ID.
--folder Download a whole folder instead of a single file.
-O <name> Save the download under a chosen file name or path.

Examples

# Install gdown
/go/gdown

# Download a single file by its ID
gdown --id 1AbCdEfGhIjKlMnOpQrStUvWxYz

# Download a file from its share link
gdown "https://drive.google.com/uc?id=1AbCdEfGhIjKlMnOpQrStUvWxYz"

# Download a file and choose the output name
gdown --id 1AbCdEfGhIjKlMnOpQrStUvWxYz -O backup.zip

# Download a whole folder
gdown --folder --id 1ZyXwVuTsRqPoNmLkJiHgFeDcBa

[!TIP]
The file ID is the long string in the Google Drive share link, between /d/ and /view for a file, or after /folders/ for a folder.

Output

The command prints the package manager’s installation output, then a short block of usage examples.

Examples:-
Download file from google drive:
gdown --id <file_id>

Download folder from google drive:
gdown --folder --id <folder_id>

Outcome What you get
Supported OS Packages are installed, then the examples are printed.
Unsupported OS Nothing is installed. The examples are still printed.
Installation fails The package manager’s error is shown. The examples are still printed and the exit status is still 0.

Every run is also logged to /var/log/go/gdown.log with a timestamp and the arguments used.

See the full reference at /go/gdown and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *