LinuxCommandLibrary

megadl

Download files from Mega.nz

TLDR

View documentation for the original command

$ tldr megatools-dl
copy

SYNOPSIS

megadl [OPTIONS] <MEGA_URL> [DESTINATION]

PARAMETERS

-h, --help
    Show help message and exit

-v, --version
    Show version information and exit

-u, --username
    Mega.nz account email

-p, --password
    Mega.nz account password

--credentials
    Read username/password from file. Format: username:password

--proxy
    Use HTTP proxy

--insecure
    Disable SSL certificate verification

--path
    Path to store the downloaded files (overrides the command line destination parameter). The DESTINATION parameter in the synopsis specifies where to save the files. If DESTINATION is a directory, the downloaded files will be saved inside it, with their original names. If DESTINATION is omitted, files will be saved in the current directory.

--debug
    Enable debug output

--retries
    Number of download retries. Default is 3.

--output-file
    Specify the output file name for a single file download.

DESCRIPTION

MegaDL is a command-line utility designed to download files from Mega.nz cloud storage. It provides a simple and efficient way to retrieve files without needing a graphical interface. It supports downloading single files or entire folders. It leverages the Mega.nz API to authenticate and manage the downloads.

It is particularly useful in scripting environments or on systems where a desktop client is not available or desired. MegaDL handles authentication, file retrieval, and provides progress reporting during downloads. Its command-line nature makes it suitable for automating download tasks and integrating with other utilities.

CAVEATS

Using the `-u` and `-p` options directly in the command line might expose your credentials in the shell history. It is recommended to use the `--credentials` option to read them from a file or use environment variables.

MEGA_URL FORMAT

The MEGA_URL should be a valid URL pointing to a Mega.nz resource like a file or a folder. For example: https://mega.nz/file/xxxx#yyyy or https://mega.nz/folder/xxxx#yyyy

AUTHENTICATION

MegaDL requires valid credentials to download files that are not publicly accessible. These credentials can be provided via command-line options (`-u`, `-p`), through a credentials file (`--credentials`), or through environment variables (usually MEGA_USERNAME and MEGA_PASSWORD, but check the specific implementation's documentation).

SEE ALSO

wget(1), curl(1)

Copied to clipboard