'\" t
.\" Title: megals
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 04/15/2020
.\" Manual: Megatools Manual
.\" Source: megatools 1.10.2
.\" Language: English
.\"
.TH "MEGALS" "1" "04/15/2020" "megatools 1.10.2" "Megatools Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
megals \- List files stored in the cloud
.SH "SYNOPSIS"
.sp
.nf
\fImegals\fR [\-e] [\-h] [\-\-header] [\-l] [\-R] [\-n] [\&...]
.fi
.SH "DESCRIPTION"
.sp
Lists files stored on Mega\&.nz, exports public download links\&.
.SH "OPTIONS"
.PP
\-\-export, \-e
.RS 4
For all files that are going to be listed, also display public download link with file key\&.
.sp
\fBNOTE\fR: Folders export doesn\(cqt work yet\&.
.RE
.PP
\-\-human, \-h
.RS 4
Display file sizes in a human readable format\&.
.RE
.PP
\-\-header
.RS 4
For long list format, display header describing all listed columns\&.
.RE
.PP
\-\-long, \-l
.RS 4
List additional information about listed filesystem nodes\&. Node handle, owner, node type, file size, and the last modification date\&.
.RE
.PP
\-\-recursive, \-R
.RS 4
List directories recursively\&. This is the default if no paths are specified\&.
.RE
.PP
\-\-names, \-n
.RS 4
Show only names of nodes within the directory\&. This option has effect only if you specified a single path on a command line\&.
.RE
.PP
\-\-print0, \-0
.RS 4
Separate file names with NULs instead of new lines\&.
.RE
.PP
\-u , \-\-username
.RS 4
Account username (email)
.RE
.PP
\-p , \-\-password
.RS 4
Account password
.RE
.PP
\-\-no\-ask\-password
.RS 4
Never ask interactively for a password
.RE
.PP
\-\-reload
.RS 4
Reload filesystem cache
.RE
.PP
\-\-limit\-speed
.RS 4
Set maximum allowed upload and download speed in KiB/s\&. This option overrides config file settings\&. 0 means no limit\&. When using ParallelTransfers > 1, upload speed limit is applied to each transfer individually\&.
.RE
.PP
\-\-proxy
.RS 4
Use proxy server to connect to mega\&.nz\&. This option overrides config file settings\&. More information can be found in libcurl documentation at
https://curl\&.haxx\&.se/libcurl/c/CURLOPT_PROXY\&.html\&. Some acceptable values are:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
none
: Disable proxy if it was enabled in the config file\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
socks5://localhost:9050
: Local SOCKSv5 proxy server
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
socks5h://localhost:9050
: Local SOCKSv5 proxy server with DNS handled by the proxy
.RE
.RE
.PP
\-\-config
.RS 4
Load configuration from a file
.RE
.PP
\-\-ignore\-config\-file
.RS 4
Disable loading \&.megarc
.RE
.PP
\-\-debug []
.RS 4
Enable debugging of various aspects of the megatools operation\&. You may enable multiple debugging options separated by commas\&. (eg\&.
\-\-debug api,fs)
.sp
Available options are:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
http: Dump HTTP request/response details (can be used to debug connection/proxy issues)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
api: Dump Mega\&.nz API calls
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
fs: Dump Mega\&.nz filesystem (may require
\-\-reload
to actually print something)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
cache: Dump cache contents
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
tman: Dump transfer manager events
.RE
.RE
.PP
\-\-version
.RS 4
Show version information
.RE
.PP
.RS 4
One or more remote filesystem paths to list\&. If path points to a directory, contents of the directory and the directory itself is listed\&. When
\-\-names
is given, only the contents of the directory is listed\&.
.sp
.if n \{\
.RS 4
.\}
.nf
If path points to a file, the file itself is listed\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
If ommited, the entire remote filesystem is listed recursively\&.
.fi
.if n \{\
.RE
.\}
.RE
.SH "EXAMPLES"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
List all files:
.sp
.if n \{\
.RS 4
.\}
.nf
$ megals
/Contacts
/Inbox
/Root
/Root/README
/Root/bigfile
/Trash
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
List all files in the /Root, recursively and with details:
.sp
.if n \{\
.RS 4
.\}
.nf
$ megals \-l /Root
3RsS2QwJ 2 \- 2013\-01\-22 12:31:06 /Root
2FFSiaKZ Xz2tWWB5Dmo 0 2686 2013\-04\-15 08:33:47 /Root/README
udtDgR7I Xz2tWWB5Dmo 0 4405067776 2013\-04\-10 19:16:02 /Root/bigfile
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
List all files in the /Root, recursively and with details, show only file names:
.sp
.if n \{\
.RS 4
.\}
.nf
$ megals \-ln /Root
2FFSiaKZ Xz2tWWB5Dmo 0 2686 2013\-04\-15 08:33:47 README
udtDgR7I Xz2tWWB5Dmo 0 4405067776 2013\-04\-10 19:16:02 bigfile
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Export download links:
.sp
.if n \{\
.RS 4
.\}
.nf
$ megals \-e /Root/README
https://mega\&.nz/#!OFFRlbgR!k5rWmLp3mxB0gsq07Ii67PLd9L0wq4KondFLDlfH3Uw /Root/README
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
List files in a more human readable format:
.sp
.if n \{\
.RS 4
.\}
.nf
$ megals \-hnl \-\-header /Root/README
===================================================================================
Handle Owner T Size Mod\&. Date Filename
===================================================================================
2FFSiaKZ Xz2tWWB5Dmo 0 2\&.6 KiB 2013\-04\-15 08:33:47 README
.fi
.if n \{\
.RE
.\}
.RE
.SH "REMOTE FILESYSTEM"
.sp
Mega\&.nz filesystem is represented as a tree of nodes of various types\&. Nodes are identified by a 8 character node handles (eg\&. 7Fdi3ZjC)\&. Structure of the filesystem is not encrypted\&.
.sp
Megatools maps node tree structure to a traditional filesystem paths (eg\&. /Root/SomeFile\&.DAT)\&.
.sp
\fBNOTE\fR: 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:
.sp
.if n \{\
.RS 4
.\}
.nf
/Root/conflictingfile
/Root/conflictingfile\&.7Fdi3ZjC
/Root/conflictingfile\&.mEU23aSD
.fi
.if n \{\
.RE
.\}
.sp
You need to be aware of several special folders:
.PP
/Root
.RS 4
Writable directory representing the root of the filesystem\&.
.RE
.PP
/Trash
.RS 4
Trash directory where Mega\&.nz web client moves deleted files\&. This directory is not used by megatools when removing files\&.
.RE
.PP
/Inbox
.RS 4
Not sure\&.
.RE
.PP
/Contacts
.RS 4
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\&.
.RE
.PP
/Contacts/
.RS 4
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\&.
.RE
.SH "SEE ALSO"
.sp
\fBmegatools\fR(7), \fBmegarc\fR(5), \fBmegadf\fR(1), \fBmegadl\fR(1), \fBmegaget\fR(1), \fBmegals\fR(1), \fBmegamkdir\fR(1), \fBmegaput\fR(1), \fBmegareg\fR(1), \fBmegarm\fR(1), \fBmegacopy\fR(1)\&.
.SH "MEGATOOLS"
.sp
Part of the \fBmegatools\fR(7) suite\&.
.SH "BUGS"
.sp
Report bugs at https://github\&.com/megous/megatools or megous@megous\&.com\&.
.SH "AUTHOR"
.sp
Megatools was written by Ondrej Jirman , 2013\-2016\&.
.sp
Official website is http://megatools\&.megous\&.com\&.