megatools-get(1)
================

NAME
----
megatools get - download files from your Mega.nz account


SYNOPSIS
--------
[verse]
'megatools get' [--no-progress] [--path <path>] <remotepaths>...
'megatools get' --path - <remotefile>


DESCRIPTION
-----------

Downloads files from your Mega.nz account. Existing local files are never
overwritten: such a download fails, and the other files are still
downloaded. Interrupted downloads are resumed when run again (see
`--disable-resume`).

*NOTE*: To download entire folders, use man:megatools-copy[1].


OPTIONS
-------

--path <path>::
	Local path to download to (default: the current directory). If this
	path is a directory, the files are placed into it. If it doesn't
	exist, and its parent directory does, the file is saved under this
	name (this only works with exactly one remote path). A path ending
	with `/` must be an existing directory.
+
If `<path>` is `-`, the remote file is streamed to stdout.

--no-progress::
	Disable download progress reporting. This is implied when streaming.

include::download-options.txt[]
include::auth-options.txt[]
include::basic-options.txt[]

<remotepaths>::
	One or more remote files to download.

<remotefile>::
	Remote path to a single file to stream.


EXIT STATUS
-----------

0 when all files were downloaded, 1 when one of them failed.


EXAMPLES
--------

* Download a file to the current directory:
+
------------
$ megatools get /Root/README
Downloaded README
------------


* Download several files into a directory:
+
------------
$ megatools get --path ~/Downloads /Root/report.pdf /Root/slides.pdf
------------


* Download a file under another name:
+
------------
$ megatools get --path notes.txt /Root/README
------------


* Watch a video while it downloads, or check the first bytes of a file:
+
------------
$ megatools get --path - /Root/video.mp4 | mpv -
$ megatools get --path - /Root/backup.tar.gz | head -c 2 | xxd
------------


include::remote-paths.txt[]

include::footer.txt[]
