megatools(1)

NAME
megatools - Mega.nz command line tools

SYNOPSIS
    megatools df [--free|--total|--used] [--mb|--gb|-h]
    megatools ls [-e] [-h] [--header] [-l] [-R] [-n] [<remotepaths>...]
    megatools test [-f|-d] <remotepaths>...
    megatools export <remotepaths>...
    megatools put [--no-progress] [--path <remotepath>] <paths>...
    megatools mkdir <remotepaths>...
    megatools mkdir /Contacts/<contactemail>
    megatools get [--no-progress] [--path <path>] <remotepaths>...
    megatools get --path - <remotefile>
    megatools copy [-n] [--no-progress] --local <path> --remote <remotepath>
    megatools copy [-n] [--no-progress] --download --local <path> --remote <remotepath>
    megatools rm <remotepaths>...
    megatools rm /Contacts/<contactemail>
    megatools dl [--no-progress] [--path <path>] <links>...
    megatools dl --path - <filelink>
    megatools reg [--scripted] --register --email <email> --name <realname> --password <password>
    megatools reg [--scripted] --verify <state> <link>

DESCRIPTION
Megatools is a collection of programs for accessing Mega service from a command line of your desktop or server.

Megatools allow you to copy individual files as well as entire directory trees to and from the cloud. You can also perform streaming downloads for example to preview videos and audio files, without needing to download the entire file.

Megatools are robust and optimized for fast operation - as fast as Mega servers allow. Memory requirements and CPU utilization are kept at minimum.

You can register account using a megatools-reg(1) tool, with the benefit of having true control of your encryption keys.

Mega website can be found at ⟨https://mega.nz⟩.

Megatools can be downloaded at ⟨https://xff.cz/megatools/⟩

TOOLS OVERVIEW

megatools-reg(1)
    Register and verify a new mega account

megatools-df(1)
    Show your cloud storage space usage/quota

megatools-ls(1)
    List all remote files

megatools-test(1)
    Test for existence of files or folders

megatools-export(1)
    Create public links for remote files

megatools-mkdir(1)
    Create remote directory

megatools-rm(1)
    Remove remote file or directory

megatools-put(1)
    Upload individual files

megatools-get(1)
    Download individual files

megatools-dl(1)
    Download file from a "public" Mega link (doesn’t require login)

megatools-copy(1)
    Upload or download a directory tree

CONFIGURATION FILES
See megarc(5) for information about mega configuration file.

Each of the individual tools have help that can be accessed using --help parameter.

SESSION CACHE
If you modify cloud filesystem from the Mega.nz website or from another computer, you’ll need to refresh your session cache. This can be done by using the --reload option to any tool, or by waiting for a cache timeout (default timeout is set to 10 minutes).

REMOTE FILESYSTEM
Mega.nz filesystem is represented as a tree of nodes of various types. Nodes are identified by a 8 character node handles (eg. \FC7Fdi3ZjC\F[]). Structure of the filesystem is not encrypted.

Megatools maps node tree structure to a traditional filesystem paths (eg. \FC/Root/SomeFile.DAT\F[]).

NOTE: By the nature of Mega.nz storage, several files in the directory can have the same name. To allow access to such files, the names of conflicting files are extended by appending dot and their node handle like this:

\FC/Root/conflictingfile
/Root/conflictingfile.7Fdi3ZjC
/Root/conflictingfile.mEU23aSD\F[]

You need to be aware of several special folders:

/Root
    Writable directory representing the root of the filesystem.

/Trash
    Trash directory where Mega.nz web client moves deleted files. This directory is not used by megatools when removing files.

/Inbox
    Not sure.

/Contacts
    Directory containing subdirectories representing your contacts list. If you want to add contacts to the list, simply create subdirectory named after the contact you want to add.

/Contacts/<email>
    Directories representing individual contacts in your contacts list. These directories contain folders that others shared with you. All shared files are read-only, at the moment.

SEE ALSO
megatools(1), megarc(5), megatools-df(1), megatools-dl(1), megatools-get(1), megatools-ls(1), megatools-mkdir(1), megatools-put(1), megatools-reg(1), megatools-rm(1), megatools-copy(1).

MEGATOOLS
Part of the megatools(1) suite of commands.

BUGS
There is no upstream support for bugreports and feature requests. But you can send code patches to to get them integrated into upstream repository.

AUTHOR
Megatools was written by Ondrej Jirman < >, 2013-2022.

Official website is ⟨https://xff.cz/megatools/⟩.