I am running Ubuntu Server 18.04, and I was wondering if it was possible to download mega.nz files from the command-line, e.g. using putty or some other tool?
I am running Ubuntu Server 18.04, and I was wondering if it was possible to download mega.nz files from the command-line, e.g. using putty or some other tool?
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 first. Megatools are robust and optimized for fast operation - as fast as Mega servers allow. This is quite fast. Memory requirements and CPU utilization are kept at minimum.
Megatools is provided in Ubuntu by the universe repository. You can install megatools in all currently supported versions of Ubuntu with the following command:
As of November/21, Ubuntu 20.04 and megatools 1.10.2, you can use
Megatools
as mentioned in @karel's answer, butmegadl
has an unfixed issue while dealing with MEGA URLs.If you need to download a file, the URL will be something like
https://mega.nz/file/<some_id>#<some_other_id>
and needs to be changed intohttps://mega.co.nz/#!<some_id>!<some_other_id>
for it to work. Remember to put between single quotes, so:Folder URLs need to be adapted too, from
https://mega.nz/folder/<some_id>#<some_other_id>
tohttps://mega.co.nz/#F!<some_id>!<some_other_id>
, so:megacmd works without login
have fun building this on debian : P
"proper" distros like nixos or arch have a package for megacmd ...
but you can use nix on debian : D
I solved this making a .sh file with 600 lines that look like this:
You hace to download megatools previously. Give to your .sh file execution permissions (chmod +x fileName) and launch it into your command line (./fileName.sh)