1megatools-ls(1)                                                megatools-ls(1)
2
3
4

NAME

6       megatools ls - List files stored in the cloud
7

SYNOPSIS

9              megatools ls [-e] [-h] [--header] [-l] [-R] [-n] [<remotepaths>...]
10

DESCRIPTION

12       Lists files stored on Mega.nz, exports public download links.
13

OPTIONS

15       --export , -e
16              For  all  files that are going to be listed, also display public
17              download link with file key.
18
19              NOTE: Folders export doesn’t work yet.
20
21       --human , -h
22              Display file sizes in a human readable format.
23
24       --header
25              For long list format, display header describing all listed  col‐
26              umns.
27
28       --long , -l
29              List additional information about listed filesystem nodes.  Node
30              handle, owner, node type, file size, and the  last  modification
31              date.
32
33       --recursive , -R
34              List  directories  recursively.  This is the default if no paths
35              are specified.
36
37       --names , -n
38              Show only names of nodes within the directory. This  option  has
39              effect only if you specified a single path on a command line.
40
41       --print0 , -0
42              Separate file names with NULs instead of new lines.
43
44       -u <email> , --username <email>
45              Account username (email)
46
47       -p <password> , --password <password>
48              Account password
49
50       --no-ask-password
51              Never ask interactively for a password
52
53       --reload
54              Reload filesystem cache
55
56       --limit-speed <speed>
57              Set  maximum  allowed  upload and download speed in KiB/s.  This
58              option overrides config file settings. 0 means no  limit.   When
59              using  ParallelTransfers  >  1, upload speed limit is applied to
60              each transfer individually.
61
62       --proxy <proxy>
63              Use proxy server to connect to mega.nz.  This  option  overrides
64              config  file settings.  More information can be found in libcurl
65              documentation      at       ⟨https://curl.haxx.se/libcurl/c/CUR
66              LOPT_PROXY.html⟩.  Some acceptable values are:
67
68              · none : Disable proxy if it was enabled in the config file.
69
70              · socks5://localhost:9050 : Local SOCKSv5 proxy server
71
72              · socks5h://localhost:9050 : Local SOCKSv5 proxy server with DNS
73                handled by the proxy
74
75       --netif <ifname|ip>
76              Network interface or local IP address used for outgoing  connec‐
77              tions.   You  have  to  specify IP address bound to some of your
78              local network interfaces, when specifying an IP address.
79
80       --ip-proto <proto>
81              Which IP protocol to prefer when connecting to mega.nz (v4,  v6,
82              or  any).   This  is  just  an  advisory option.  Megatools will
83              resolve mega.nz domain, and then use an A or AAAA  record  based
84              on the stated preference.
85
86       --config <path>
87              Load configuration from a file
88
89       --ignore-config-file
90              Disable loading .megarc
91
92       --debug [<options>]
93              Enable  debugging of various aspects of the megatools operation.
94              You may enable multiple debugging options separated  by  commas.
95              (eg. --debug api,fs)
96
97              Available options are:
98
99              · http: Dump HTTP request/response details (can be used to debug
100                connection/proxy issues)
101
102              · api: Dump Mega.nz API calls
103
104              · fs: Dump Mega.nz filesystem (may require --reload to  actually
105                print something)
106
107              · cache: Dump cache contents
108
109              · tman: Dump transfer manager events
110
111       --version
112              Show version information
113
114       <remotepaths>
115              One or more remote filesystem paths to list. If path points to a
116              directory, contents of the directory and the directory itself is
117              listed.  When  --names is given, only the contents of the direc‐
118              tory is listed.
119
120              If path points to a file, the file itself is listed.
121
122              If omitted, the entire remote filesystem is listed recursively.
123

EXAMPLES

125       · List all files:
126
127         $ megatools ls
128
129         /Contacts
130         /Inbox
131         /Root
132         /Root/README
133         /Root/bigfile
134         /Trash
135
136       · List all files in the /Root, recursively and with details:
137
138         $ megatools ls -l /Root
139
140         3RsS2QwJ                2             - 2013-01-22 12:31:06 /Root
141         2FFSiaKZ    Xz2tWWB5Dmo 0          2686 2013-04-15 08:33:47 /Root/README
142         udtDgR7I    Xz2tWWB5Dmo 0    4405067776 2013-04-10 19:16:02 /Root/bigfile
143
144       · List all files in the /Root, recursively and with details, show  only
145         file names:
146
147         $ megatools ls -ln /Root
148
149         2FFSiaKZ    Xz2tWWB5Dmo 0          2686 2013-04-15 08:33:47 README
150         udtDgR7I    Xz2tWWB5Dmo 0    4405067776 2013-04-10 19:16:02 bigfile
151
152       · Export download links:
153
154         $ megatools ls -e /Root/README
155
156         https://mega.nz/#!OFFRlbgR!k5rWmLp3mxB0gsq07Ii67PLd9L0wq4KondFLDlfH3Uw /Root/README
157
158       · List files in a more human readable format:
159
160         $ megatools ls -hnl --header /Root/README
161
162         ===================================================================================
163         Handle      Owner       T          Size Mod. Date           Filename
164         ===================================================================================
165         2FFSiaKZ    Xz2tWWB5Dmo 0       2.6 KiB 2013-04-15 08:33:47 README
166

REMOTE FILESYSTEM

168       Mega.nz  filesystem is represented as a tree of nodes of various types.
169       Nodes are identified by a 8  character  node  handles  (eg.  7Fdi3ZjC).
170       Structure of the filesystem is not encrypted.
171
172       Megatools  maps  node  tree structure to a traditional filesystem paths
173       (eg.  /Root/SomeFile.DAT).
174
175       NOTE: By the nature of Mega.nz storage, several files in the  directory
176       can  have  the  same  name. To allow access to such files, the names of
177       conflicting files are extended by appending dot and their  node  handle
178       like this:
179
180       /Root/conflictingfile
181       /Root/conflictingfile.7Fdi3ZjC
182       /Root/conflictingfile.mEU23aSD
183
184       You need to be aware of several special folders:
185
186       /Root  Writable directory representing the root of the filesystem.
187
188       /Trash Trash  directory  where  Mega.nz web client moves deleted files.
189              This directory is not used by megatools when removing files.
190
191       /Inbox Not sure.
192
193       /Contacts
194              Directory containing subdirectories representing  your  contacts
195              list.  If  you  want  to add contacts to the list, simply create
196              subdirectory named after the contact you want to add.
197
198       /Contacts/<email>
199              Directories representing individual contacts  in  your  contacts
200              list.  These directories contain folders that others shared with
201              you. All shared files are read-only, at the moment.
202

SEE ALSO

204       megatools(1), megarc(5), megatools-df(1),  megatools-dl(1),  megatools-
205       get(1),  megatools-ls(1),  megatools-mkdir(1),  megatools-put(1), mega‐
206       tools-reg(1), megatools-rm(1), megatools-copy(1).
207

MEGATOOLS

209       Part of the megatools(1) suite of commands.
210

BUGS

212       Report bugs  to  megatools@megous.com  ⟨mailto:megatools@megous.com⟩  .
213       Your  message  will  end up in a public archive, so be careful what you
214       say or send.
215

AUTHOR

217       Megatools was written by Ondrej Jirman < megatools@megous.com
218       ⟨mailto:megatools@megous.com⟩ >, 2013-2019.
219
220       Official website is ⟨http://megatools.megous.com⟩.
221
222
223
224                                5 January 2021                 megatools-ls(1)
Impressum