I have a VERY slow connection from home and I hate that every time I need to upgrade Mint, it takes a painful amount of time to upload files from my home connection. It got even worse now that I manage Mint installs for some clients. So after a bit of reading up on cURL’s man pages, I figured out how to download via the command line on the server directly.
The steps are as follows:
- Login via SSH to your server and ‘cd’ to the folder you want to download Mint/Peppers to.
- Execute the following curl statement. Be sure to replace EMAIL and PASSWORD with the appropriate values. Also, the .cookies folder should exist in your home folder.
curl --cookie-jar ~/.cookies/haveamint --data account[email]=EMAIL&account[password]=PASSWORD&account[action]=login" http://haveamint.com/
- The file ~/.cookies/haveamint should now contain your login details. Run the command
cat ~/.cookies/haveamintand check for keys account_password_hash and account_email if you want to make sure the file is ready. - Now you can tell curl to use these cookies when downloading files from haveamint.com. Simply use the following statement and replace URL with the URL of the file you want to download:
curl -L -O --cookie ~/.cookies/haveamint URL