megatools-dl(1)
β¨ megatools-dl β like, the downloader one π
okay bestie, sit DOWN because this is the megatools-dl(1) page and it's about to be your new fave. It's part of the megatools family, it grabs your stuff off Mega.nz, and I'm gonna walk you through every single crumb. no skimming, no skipping, we're doing the whole thing. π
πΈ NAME πΈ
megatools dl β download exported files and directories from Mega.nz π¦
β¨ SYNOPSIS β¨
megatools dl [--no-progress] [--path <path>] <links>...
megatools dl --path - <filelink>
heads up: that second line is a whole different mode.<path>being-means the file gets streamed to stdout, and it only takes one<filelink>. not a vibe you can mix and match, okay? π
π DESCRIPTION π
So basically: this thing downloads exported files AND folders from Mega.nz. It handles links that look like this:
https://mega.nz/#!7YVWhCzZ!bauBlAkKKvv8hIm-8-qFmGOYS289ToQWN7rGFPzXB_whttps://mega.nz/#F!HIlFDajT!HLiVvQQkSe1d0ogxZuaOJg
When you're downloading individual files, they land in <path>. When you're downloading folders, the contents of the folder get dropped into the directory that <path> points at. (yes, contents. the folder itself doesn't nest in there. the way that works is so specific and I respect it.)
And how do you even get exported files in the first place? Two ways, bestie:
- use the Mega.nz web app, or
- use the
--exportoption onmegatools-ls(1)
periodt. π«
π OPTIONS π
--path <path>β the local directory you're downloading into. defaults to the current working directory. BUT β if<path>is-, the remote file gets streamed straight to stdout. main character behaviour, honestly. π₯--no-progressβ turns off the download progress reporting. ngl this one gets implied automatically when you're streaming, so don't stress about it. π«Ά--print-namesβ prints the names/paths of files that downloaded successfully, one per line. cute lil receipt. π§Ύ--choose-filesβ prints every file in a shared folder and lets you pick which files or subfolders to download. and if you pick a subfolder? the entire subfolder comes down. no half measures. π--disable-resumeβ stops it from resuming downloads off a partially downloaded file. the default is to resume, so this is you actively choosing chaos (or a fresh start, no judgement π).--limit-speed <speed>β sets the max allowed upload AND download speed, in KiB/s. this overrides whatever the config file says.0means no limit at all, go feral. important: whenParallelTransfers > 1, the upload speed limit gets applied to each transfer individually β not shared across them.--proxy <proxy>β routes the connection to mega.nz through a proxy server. overrides the config file settings. more info lives in the libcurl docs athttps://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html. some acceptable values are:none: disables the proxy if it was enabled in the config filesocks5://localhost:9050: a local SOCKSv5 proxy serversocks5h://localhost:9050: a local SOCKSv5 proxy server, except DNS is handled by the proxy
--netif <ifname|ip>β the network interface (or local IP address) used for outgoing connections. psa: if you're giving it an IP address, it has to be an IP address bound to one of your local network interfaces. don't just make one up bestie π--ip-proto <proto>β which IP protocol to prefer when connecting to mega.nz:v4,v6, orany. it's just an advisory thing, not a demand β megatools resolves the mega.nz domain and then picks an A or AAAA record based on the preference you stated. vibe check, not a rule. π--config <path>β load configuration from a file π--ignore-config-fileβ stops it from loading.megarcπ--debug [<options>]β turns on debugging for various aspects of megatools. you can stack multiple debug options separated by commas (eg.--debug api,fs). the available options are:http: dumps HTTP request/response details (super useful for debugging connection/proxy issues)api: dumps Mega.nz API callsfs: dumps the Mega.nz filesystem (might need--reloadbefore it actually prints anything)cache: dumps the cache contentstman: dumps transfer manager events
--versionβ shows version info β<links>β the file and folder links you wanna download from.<filelink>β the link to the exported file you wanna stream.
π EXAMPLES π
- download an exported file:
$ megatools dl 'https://mega.nz/#!7YVWhCzZ!bauBlAkKKvv8hIm-8-qFmGOYS289ToQWN7rGFPzXB_w'
- download an exported folder:
$ megatools dl 'https://mega.nz/#F!HIlFDajT!HLiVvQQkSe1d0ogxZuaOJg'
like, that's it. two lines. ate. π β¨
π¦ REMOTE FILESYSTEM π¦
okay this part is lowkey the most interesting bit, stay with me.
The Mega.nz filesystem is represented as a tree of nodes of various types. every node is identified by an 8 character node handle (eg. 7Fdi3ZjC). and fun fact: the structure of the filesystem is not encrypted. π
Megatools maps that node tree structure onto traditional filesystem paths (eg. /Root/SomeFile.DAT).
NOTE: because of the nature of Mega.nz storage, several files in the same directory can have the same name. to let you actually reach them, conflicting filenames get extended by appending a dot and their node handle, like this:
/Root/conflictingfile
/Root/conflictingfile.7Fdi3ZjC
/Root/conflictingfile.mEU23aSD
and you NEED to be aware of these special folders, bestie, they're iconic:
/Rootβ the writable directory representing the root of the filesystem./Trashβ the trash directory where the Mega.nz web client moves deleted files. note: this directory is NOT used by megatools when removing files. it just lives there. chilling./Inboxβ not sure. π (that's genuinely what the manpage says, I'm not gatekeeping anything from you)/Contactsβ a directory containing subdirectories representing your contacts list. if you wanna add contacts to the list, you literally just create a subdirectory named after the contact you want to add. that's the whole mechanic. slay./Contacts/<email>β directories representing individual contacts in your contacts list. these directories contain folders that other people shared with you. and all shared files are read-only at the moment, so look don't touch. π«Ά
π« 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).
(go read them, they're all part of the same friend group π«)
π MEGATOOLS π
Part of the megatools(1) suite of commands. π
π BUGS π
ngl there is no upstream support for bugreports and feature requests. none. zero. that's the situation. BUT β you can send code patches to megatools@xff.cz to get them integrated into the upstream repository. so if you've got the fix, bring the fix. patches only, bestie. π₯
π AUTHOR π
Megatools was written by Ondrej Jirman < megatools@xff.cz >, 2013-2022.
Official website is https://xff.cz/megatools/. π
and that's the whole page!! you made it to the end, I'm so proud of you fr fr. π₯Ή
this was the megatools-dl(1) manual page, dated 11 July 2025 β mwah, go download something iconic. π
β¨π
π¦ where this page comes from
- debian trixie: megatools 1.11.5-1 Β· GPL-2+with_exception
- ubuntu questing: megatools 1.11.5-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms