MEGALS(1)

πŸ“¦ version 1.10.3, in ubuntu jammy

✨ MEGALS(1) β€” the megatools manual, bestie edition ✨

okay so you wanna list your stuff in the cloud? that's literally what megals does, and it's part of the megatools suite πŸ’– pull up a chair, we're doing this.


🌸 NAME 🌸

megals β€” List files stored in the cloud ☁️✨


πŸŽ€ SYNOPSIS πŸŽ€

megals [-e] [-h] [--header] [-l] [-R] [-n] [<remotepaths>...]

πŸ¦‹ DESCRIPTION πŸ¦‹

It lists files stored on Mega.nz, and it can also export public download links. that's the whole vibe. no cap. πŸ’…


πŸ’– OPTIONS πŸ’–

  • --export, -e β€” for every file that's about to be listed, it also shows you the public download link along with the file key. πŸ”—
NOTE: Folders export doesn't work yet. πŸ’€ folders stay un-exported, bestie.
  • --human, -h β€” shows file sizes in a human readable format, so instead of a big scary number you get something your brain can actually process 🧠✨
  • --header β€” in long list format, this displays a header describing all the listed columns. like a lil table of contents for your table πŸ“‹
  • --long, -l β€” lists extra info about the listed filesystem nodes: node handle, owner, node type, file size, and the last modification date. the full tea β˜•
  • --recursive, -R β€” lists directories recursively. this is the default if you don't specify any paths πŸ‘‘
  • --names, -n β€” shows only the names of nodes within the directory. heads up: this one only has an effect if you specified a single path on the command line. one path, one rule 🎯
  • --print0, -0 β€” separates file names with NULs instead of new lines. for when newlines are simply not the moment 🫢
  • -u <email>, --username <email> β€” account username (email) πŸ“§
  • -p <password>, --password <password> β€” account password πŸ”
  • --no-ask-password β€” never ask interactively for a password. it just won't, periodt πŸ™ˆ
  • --reload β€” reload filesystem cache. fresh eyes on the filesystem, slay πŸ”„
  • --limit-speed <speed> β€” set the maximum allowed upload and download speed in KiB/s. this option overrides config file settings. 0 means no limit. when using ParallelTransfers > 1, the upload speed limit is applied to each transfer individually. so like, per-transfer limit, iykyk 🏎️
  • --proxy <proxy> β€” use a proxy server to connect to mega.nz. this option overrides config file settings. more info lives in the libcurl documentation at https://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html. some acceptable values are:
    • none : Disable proxy if it was enabled in the config file.
    • socks5://localhost:9050 : Local SOCKSv5 proxy server
    • socks5h://localhost:9050 : Local SOCKSv5 proxy server with DNS handled by the proxy
  • --config <path> β€” load configuration from a file πŸ—‚οΈ
  • --ignore-config-file β€” disable loading .megarc πŸ™…β™€οΈ
  • --debug [<options>] β€” enable debugging of various aspects of the megatools operation. you may enable multiple debugging options separated by commas (eg. --debug api,fs). choose your fighter(s) πŸ›

Available options are:

  • http: Dump HTTP request/response details (can be used to debug connection/proxy issues)
  • api: Dump Mega.nz API calls
  • fs: Dump Mega.nz filesystem (may require --reload to actually print something)
  • cache: Dump cache contents
  • tman: Dump transfer manager events
  • --version β€” show version information ⭐
  • <remotepaths> β€” one or more remote filesystem paths to list. if the path points to a directory, the contents of the directory and the directory itself are listed. when --names is given, only the contents of the directory is listed.

If the path points to a file, the file itself is listed.

If ommited, the entire remote filesystem is listed recursively. (yes, "ommited" β€” we're quoting the original, bestie, don't come for me 😭)


🌈 EXAMPLES 🌈

  • List all files:
$ megals

/Contacts
/Inbox
/Root
/Root/README
/Root/bigfile
/Trash
  • List all files in the /Root, recursively and with details:
$ 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
  • List all files in the /Root, recursively and with details, show only file names:
$ 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
  • Export download links:
$ megals -e /Root/README

https://mega.nz/#!OFFRlbgR!k5rWmLp3mxB0gsq07Ii67PLd9L0wq4KondFLDlfH3Uw /Root/README
  • List files in a more human readable format:
$ 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

🧚 REMOTE FILESYSTEM 🧚

Mega.nz filesystem is represented as a tree of nodes of various types. nodes are identified by 8 character node handles (eg. 7Fdi3ZjC). the structure of the filesystem is not encrypted πŸ‘€

Megatools maps node tree structure to a traditional filesystem paths (eg. /Root/SomeFile.DAT).

NOTE: 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:
/Root/conflictingfile
/Root/conflictingfile.7Fdi3ZjC
/Root/conflictingfile.mEU23aSD

You need to be aware of several special folders:

  • /Root β€” Writable directory representing the root of the filesystem. πŸ‘‘
  • /Trash β€” Trash directory where Mega.nz web client moves deleted files. This directory is not used by megatools when removing files. πŸ—‘οΈ
  • /Inbox β€” Not sure. 😭 honestly? same.
  • /Contacts β€” 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. πŸ“‡
  • /Contacts/<email> β€” 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. πŸ”’

πŸ’œ SEE ALSO πŸ’œ

megatools(7), megarc(5), megadf(1), megadl(1), megaget(1), megals(1), megamkdir(1), megaput(1), megareg(1), megarm(1), megacopy(1).


⭐ MEGATOOLS ⭐

Part of the megatools(7) suite. πŸ’…


πŸ’€ BUGS πŸ’€

Report bugs at https://github.com/megous/megatools or megous@megous.com. (be nice, they're doing their best 🫢)


πŸ‘‘ AUTHOR πŸ‘‘

Megatools was written by Ondrej Jirman <megous@megous.com>, 2013-2016.

Official website is http://megatools.megous.com.


and that's the whole page, bestie β€” this was megatools 1.10.2, dated 04/15/2020, and it ate fr fr. now go list some files. πŸŒΈβœ¨πŸ’–

πŸ“¦ where this page comes from