How to download a file from box using wget?

Chris Snow picture Chris Snow · Sep 15, 2017 · Viewed 12.1k times · Source

I've created a direct link to a file in box:

enter image description here

The previous link is to the browser web interface, so I've then shared with a direct link:

enter image description here

However, if I download the file with a wget I receive garbage.

How can I download the file with wget?

Answer

Chris Snow picture Chris Snow · Sep 15, 2017

The solution was to add the -L option to follow the HTTP redirect:

wget -v -O myfile.tgz -L https://ibm.box.com/shared/static/xxxxx.tgz