MEGA in CLI mode
-
Problem
MEGAsync app is a GUI based solution for keeping local and remote storage in sync. There is a package called "megatools" that is available via default Ubuntu 16.04 LTS repo that provides command line utitilies to interact with MEGA. Among the tools is a command called
megacopy
, that can be used to move files to and from MEGA. Still, this utility does not provide two-way synchronization capability.The best solution at the moment is to use MEGAcmd which is built on top of the MEGA SDK.
Installing MEGAcmd
wget https://mega.nz/linux/MEGAsync/xUbuntu_16.04/amd64/megacmd-xUbuntu_16.04_amd64.deb sudo dpkg -i megacmd-xUbuntu_16.04_amd64.deb
The output will be, most probably, about the missing dependencies - install them by running:
sudo apt-get -f install
Command from megacmd package:
mega-cmd
, run it to get into interactive MEGA shell. Then:login <e-mail> <password> sync localdir remotedir
List current sync status:
sync