forked from crass/megatools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
329 lines (217 loc) · 10.2 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
megatools - command line client application for Mega
====================================================
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. Megatools
can upload 70MiB/s and download 80 MiB/s on a cheap single core Intel based VPS.
You can register mega account using the 'megatools reg' tool, with the benefit
of having true control of your encryption keys, compared to using mega.nz web
client. Anything done in the web browser uses a code you don't have control over
(unless it's your own website), and thus can't be fully trusted with your
password.
Mega website can be found at https://mega.nz.
Megatools official website is at https://megatools.megous.com
Tools
=====
reg Register and verify a new mega account
df Show your cloud storage space usage/quota
ls List all remote files
test Test for existence of remote files or folders
export Create public links for remote files
mkdir Create remote directory
rm Remove remote file or directory
put Upload individual files
get Download individual files
dl Download file from a "public" Mega link
(doesn't require login)
copy Upload or download a directory tree
All of these tools do:
- Local caching of remote session/filesystem information
for faster execution. Cache is encrypted with your password key.
- Support loading login credentials from a configuration file.
Usage
=====
See the man pages for how to use individual tools:
man megatools
Man pages are also available online at:
https://megatools.megous.com/man/megatools.html
Installation on Windows
=======================
Official builds for 32bit and 64bit Windows are avaialbe at:
https://megatools.megous.com
https://megatools.megous.com/builds/experimental/
Megatools is also available on Windows via Chocolatey thanks to ERap320.
See:
https://chocolatey.org/packages/megatools/
You can contact the chockolatey package maintainer here:
https://github.com/megous/megatools/issues/347
Windows Quirks
==============
On Windows, if you see weird characters in your megals output, you'll need
to set correct CHARSET environment variable. For example on Czech Windows
this would mean executing this command in cmd before using the tools:
set CHARSET=CP852
This is just a cosmetic issue. Internally, megatools always work with UTF-8
file names, and even if the tool's terminal output is corrupted, files names
of downloaded/uploaded files will be correct.
Installation on macOS
=====================
Thanks to Carl Moden, megatools is available in Homebrew (http://brew.sh/).
You can therefore install megatools with:
brew install megatools
Installation on your favorite GNU/Linux distribution
====================================================
Megatools may already be pre-packaged in the package repository
of your distribution. It is already available at least in:
- Arch Linux (AUR) - https://aur.archlinux.org/packages/megatools/
- Debian - https://packages.debian.org/sid/megatools
- Fedora - https://admin.fedoraproject.org/pkgdb/package/rpms/megatools/
- Gentoo - https://packages.gentoo.org/packages/net-misc/megatools
- openSUSE - https://software.opensuse.org/package/megatools
- Ubuntu - https://packages.ubuntu.com/cosmic/megatools
Be sure to check your distribution's package repository first.
Installation on FreeBSD
=======================
Megatools is available in ports thanks to Maxim V. Kostikov:
https://www.freshports.org/net/megatools/
Using a static build for Linux
==============================
Experimental static build is available since version 1.11.0. This build provides
a single megatools binary that can be copied to any GNU/Linux distribution and
run from there. It is reported that you can even copy an ARM build to your
Android smartphone and run it from your phone.
This build is useful if you want to avoid the hassle of bulding megatools on old
distributions like older versions of CentOS or RedHat.
Static builds are available here:
https://megatools.megous.com/builds/experimental/
Building megatools from source code
===================================
The official source code tarball is available at:
http://megatools.megous.com/builds/
You should check that the code was released by me by verifying PGP signatures
provided alongside the code.
You will need to install a few dependnencies before you can build megatools from
source code. Package names of these dependencies differ depending on your
GNU/Linux distribution.
Runtime dependencies are: glib2, libcurl and openssl
Build time dependencies are: gcc, make, pkg-config (pkgconf)
On Debian, Ubuntu:
apt-get -y install build-essential libglib2.0-dev libssl-dev \
libcurl4-openssl-dev
On Fedora and CentOS:
yum -y install gcc make glib2-devel libcurl-devel openssl-devel
On OpenSUSE:
zypper -n install gcc make glib2-devel libcurl-devel openssl-devel
On Arch Linux:
pacman -Sy --noconfirm --needed pkgconf gcc make glib2 curl
On Alpine Linux:
apk add --update build-base libcurl curl-dev asciidoc openssl-dev glib-dev \
glib libtool automake autoconf
You can build megatools into your HOME directory, so that they'll not pollute
your /usr or /usr/local by using --prefix=$HOME/.local option to configure.
Example build steps:
wget https://megatools.megous.com/builds/megatools-1.10.2.tar.gz{,.asc}
gpg --verify megatools-1.10.2.tar.gz.asc
cd megatools-1.10.2
./configure --prefix=$HOME/.local
make -j4
make install
If you encounter issues, read the error messages carefully. They may contain
hints on how you can solve the issue yourself (missing dependencies, missing
C compiler build flags, etc.).
Now you can run megatools from ~/.local/bin.
export PATH="$HOME/.local/bin:$PATH"
megals
Building megatools from git repository and contributing code
============================================================
Building from git is discouraged for most users, unless you want to contribute
your code to megatools.
Please don't report build issues against code that you downloaded from git if
you're an end user and don't intend to do development on megatools. This is not
a supported method of building megatools for end users, and it is not expected
to work on all distributions, or at all. If you're an end user, just use the
official tarball. If you're a developer and want help with building megatools
from git, make sure to mention it, otherwise I'll assume you're an end user and
just refer you to this README.
If you want to develop megatools, you can send patches via e-mail to
[email protected] or create pull requests on github. E-mail is the preferred
method.
In addition to the regular build steps, you'll need to install additional
dependencies. For building from git repository, you'll also need: asciidoc,
docbook-xml, autoconf, libtool, automake.
Now, get the code using git:
git clone git://megous.com/megatools
Documentation is built separately from the code, and must be built first.
Running make -C docs should build the docs, if you have all the dependencies
installed correctly.
Run ./autogen.sh instead of ./configure
The rest of the steps is the same as the regular source code build.
Example build steps:
git clone git://megous.com/megatools
cd megatools
make -j8 -C docs
./autogen.sh --prefix=$HOME/.local
make -j4
make install
Third party tools/scripts
=========================
Megatools are meant as a low-level tools that can be used as a base to create
more complicated tools for working with mega.nz. Other people have created
a third party scripts on top of megatools. If you're one of them and want to
have your project listed here, let me know.
Some third party tools can be found at:
https://amourspirit.github.io/mega_scripts/
Author
======
Megatools were written by Ondřej Jirman <[email protected]>, 2013-2018
My PGP key can be found at: https://megous.com/dl/key.txt
(Fingerprint is: 9AB138B20691621CD4CF92026E6426C677CFEFF1)
Official website is: https://megatools.megous.com
If you'd like to donate, please use contact information provided on the
official website.
Contributors
============
- Chris Tarazi <[email protected]>
- Tom Maneiro <[email protected]>
- bAndie91 <[email protected]>
- Alberto Garcia <[email protected]>
- David Guillen Fandos <[email protected]>
- Erik Nordstrøm <[email protected]>
- Johnathan Jenkins <[email protected]>
- Kagami Hiiragi <[email protected]>
- Matthew Schultz <[email protected]>
- Michael Ledin <[email protected]>
- Michael Ripley <[email protected]>
- Palmer Dabbelt <[email protected]>
- RealDolos <[email protected]>
- Viktor (Icon) VAD <[email protected]>
- cyrozap <[email protected]>
- nyuszika7h <[email protected]>
- protomouse <[email protected]>
- strupo <[email protected]>
- wdlkmpx <[email protected]>
- dal1a <[email protected]>
- Max Base <[email protected]>
Support and bug reports
=======================
If you think you've found bug in megatools, send a report including enough
information for recreating the issue to: [email protected]
IMPORTANT: I use personal e-mail server for my e-mail communication. I respond
to most e-mails, so if you are not getting a response within a few days, and
you're a user of a more aggressive e-mail provider (Outlook, iCloud, ...) it may
be because your provider rejected my e-mail as SPAM and did not deliver it at
all (not even to your SPAM folder), despite it being response to your e-mail and
my server using industry's best practices. You can either contact your e-mail
provider so that they fix their issue with rejecting legitimate responses to
your mail, or use different e-mail provider or contact channel to contact me.
(github issues)
License
=======
Megatools are licensed under GPLv2 with OpenSSL exemption, see LICENSE
file for details.
This product includes software developed by the OpenSSL Project for use
in the OpenSSL Toolkit. (http://www.openssl.org/)