1megatools-dl(1) megatools-dl(1)
2
3
4
6 megatools dl - download exported files and directories from Mega.nz
7
9 megatools dl [--no-progress] [--path <path>] <links>...
10 megatools dl --path - <filelink>
11
13 Downloads exported files and folders from Mega.nz. Handles links like:
14
15 • ⟨https://mega.nz/#!7YVWhCzZ!bauBlAkKKvv8hIm-8-qFmGOYS289ToQWN7rGF‐
16 PzXB_w⟩
17
18 • ⟨https://mega.nz/#F!HIlFDajT!HLiVvQQkSe1d0ogxZuaOJg⟩
19
20 When downloading individual files, these are placed into <path>. When
21 downloading folders, the contents of the folder are placed into direc‐
22 tory specified by <path>.
23
24 To export files, you can use Mega.nz web application, or megatools-
25 ls(1)'s --export option.
26
28 --path <path>
29 Local directory to download to. Defaults to the current working
30 directory.
31
32 If <path> is -, remote file will be streamed to stdout.
33
34 --no-progress
35 Disable download progress reporting. This is implied when
36 streaming.
37
38 --print-names
39 Print names/paths of successfully downloaded files (one per
40 line).
41
42 --choose-files
43 Print all files in a shared folder and choose which files or
44 subfolders to download. When choosing a subfolder, the entire
45 subfolder will be downloaded.
46
47 --disable-resume
48 Don’t resume downloads from partially downloaded file. Default
49 is to resume.
50
51 --limit-speed <speed>
52 Set maximum allowed upload and download speed in KiB/s. This
53 option overrides config file settings. 0 means no limit. When
54 using ParallelTransfers > 1, upload speed limit is applied to
55 each transfer individually.
56
57 --proxy <proxy>
58 Use proxy server to connect to mega.nz. This option overrides
59 config file settings. More information can be found in libcurl
60 documentation at ⟨https://curl.haxx.se/libcurl/c/CUR‐
61 LOPT_PROXY.html⟩. Some acceptable values are:
62
63 • none : Disable proxy if it was enabled in the config file.
64
65 • socks5://localhost:9050 : Local SOCKSv5 proxy server
66
67 • socks5h://localhost:9050 : Local SOCKSv5 proxy server with DNS
68 handled by the proxy
69
70 --netif <ifname|ip>
71 Network interface or local IP address used for outgoing connec‐
72 tions. You have to specify IP address bound to some of your lo‐
73 cal network interfaces, when specifying an IP address.
74
75 --ip-proto <proto>
76 Which IP protocol to prefer when connecting to mega.nz (v4, v6,
77 or any). This is just an advisory option. Megatools will re‐
78 solve mega.nz domain, and then use an A or AAAA record based on
79 the stated preference.
80
81 --config <path>
82 Load configuration from a file
83
84 --ignore-config-file
85 Disable loading .megarc
86
87 --debug [<options>]
88 Enable debugging of various aspects of the megatools operation.
89 You may enable multiple debugging options separated by commas.
90 (eg. --debug api,fs)
91
92 Available options are:
93
94 • http: Dump HTTP request/response details (can be used to debug
95 connection/proxy issues)
96
97 • api: Dump Mega.nz API calls
98
99 • fs: Dump Mega.nz filesystem (may require --reload to actually
100 print something)
101
102 • cache: Dump cache contents
103
104 • tman: Dump transfer manager events
105
106 --version
107 Show version information
108
109 <links>
110 File and folder links to download from.
111
112 <filelink>
113 Link to exported file to stream.
114
116 • Download exported file:
117
118 $ megatools dl 'https://mega.nz/#!7YVWhCzZ!bauBlAkKKvv8hIm-8-qFmGOYS289ToQWN7rGFPzXB_w'
119
120 • Download exported folder:
121
122 $ megatools dl 'https://mega.nz/#F!HIlFDajT!HLiVvQQkSe1d0ogxZuaOJg'
123
125 Mega.nz filesystem is represented as a tree of nodes of various types.
126 Nodes are identified by a 8 character node handles (eg. 7Fdi3ZjC).
127 Structure of the filesystem is not encrypted.
128
129 Megatools maps node tree structure to a traditional filesystem paths
130 (eg. /Root/SomeFile.DAT).
131
132 NOTE: By the nature of Mega.nz storage, several files in the directory
133 can have the same name. To allow access to such files, the names of
134 conflicting files are extended by appending dot and their node handle
135 like this:
136
137 /Root/conflictingfile
138 /Root/conflictingfile.7Fdi3ZjC
139 /Root/conflictingfile.mEU23aSD
140
141 You need to be aware of several special folders:
142
143 /Root Writable directory representing the root of the filesystem.
144
145 /Trash Trash directory where Mega.nz web client moves deleted files.
146 This directory is not used by megatools when removing files.
147
148 /Inbox Not sure.
149
150 /Contacts
151 Directory containing subdirectories representing your contacts
152 list. If you want to add contacts to the list, simply create
153 subdirectory named after the contact you want to add.
154
155 /Contacts/<email>
156 Directories representing individual contacts in your contacts
157 list. These directories contain folders that others shared with
158 you. All shared files are read-only, at the moment.
159
161 megatools(1), megarc(5), megatools-df(1), megatools-dl(1), megatools-
162 get(1), megatools-ls(1), megatools-mkdir(1), megatools-put(1), mega‐
163 tools-reg(1), megatools-rm(1), megatools-copy(1).
164
166 Part of the megatools(1) suite of commands.
167
169 Report bugs to megatools@megous.com ⟨mailto:megatools@megous.com⟩ .
170 Your message will end up in a public archive, so be careful what you
171 say or send.
172
174 Megatools was written by Ondrej Jirman < megatools@megous.com
175 ⟨mailto:megatools@megous.com⟩ >, 2013-2022.
176
177 Official website is ⟨http://megatools.megous.com⟩.
178
179
180
181 20 July 2023 megatools-dl(1)