тна Back to MegaDB Search

Blue_Train | 7 points | Nov 04 2016 00:11:58

MegaTools [& Other Mega CLT] Usage Questions | Megalinks MegaDB MegaTools [& Other Mega CLT] Usage Questions

Hi, I'm trying to get MegaTools operating on Mac. I installed them easily with HomeBrew, but I'm getting error after error trying to actually use any of the commands. Specifically, the tools seem to read anything after an exclamation point as being a separate string. How should I be parsing


if not as


?? Thanks.


[-] [deleted] | 2 points | Nov 04 2016 08:16:58

Not at a Mac at the moment, but I use it like this:

megadl 'https://mega.nz/#!5g5HhAZb!72PDbxu7Yv4yjKamb9rtX48iuR7dJZak-2e2JsBPa8k'

Slash after "mega.nz" and single quotes so bash/the shell doesn't try anything funny with the URL.


[-] Blue_Train | 1 points | Nov 04 2016 17:07:40

What about URLs with underscores in them?


[-] [deleted] | 2 points | Nov 04 2016 17:50:04

No idea. I just put all URL's in single quotes.


[-] Blue_Train | 2 points | Nov 05 2016 22:02:41

OK, new question: is it impossible to dl subfolders? The only way I seem to be able to do this is to first transfer them to my own account & doing megacopy -r ROOT/blahblah. If I try directly megadl-ing them, I get "Skipping invalid Mega download link" or "No such file or directory" or "Remote directory not found" or "Option parsing failed" or "syntax error near unexpected token `newline'" or "No links specified for download!" or.....& it's driving me fucking crazy. What am I doing wrong?


[-] [deleted] | 1 points | Nov 04 2016 01:33:10



[-] Blue_Train | 1 points | Nov 04 2016 02:47:19

Yeah, that gives me:

-bash: !D9lzFK6I!oSzjsiDq0EBHzoadFzdC3Q: event not found

But, what seems to be working is this stackoverflow answer, which suggests putting single quotes around the exclamation points. I'm still not clear on why this should be necessary (--?) nor why I have to do this extra step & you don't, but the file is dling now with this tweak.


[-] [deleted] | 3 points | Nov 04 2016 08:18:43

You need single quotes because otherwise the shell interprets "!" as a command related to the shell history.

General rule: When using URL's in the shell (e.g. with youtube-dl), surround them with single quotes.


[-] biswa_124 | 2 points | Nov 04 2016 04:06:27

Can you try putting "\" (without quotes) before each exclamation mark with the complete link in single quotes and see if it works?