how to download dropbox files using wget command?
Just add ?dl=1
at the end of the link! For example: https://www.dropbox.com/s/mx9eqve5l2ipgyk/test.txt?dl=1
That should give you a fine retrieval of the file in question without adding anything to the file.
One more thing! If you wanna save the file somewhere else use the -O
option like this
wget -O /root/Desktop/test.txt "https://www.dropbox.com/s/mx9eqve5l2ipgyk/test.txt?dl=1"
And if you want to have a little bit of GUI you can use zenity
to mark the location to where the file is going to be downloaded!
Here's an example code:
#!/bin/bash
dir=$(zenity --file-selection --directory)
wget -O $dir/test.txt "https://www.dropbox.com/s/mx9eqve5l2ipgyk/test.txt?dl=1"
The link in your question is not the link to the file, is a link to the Dropbox page of this file.
If you want to use wget
to download it, you should copy the link to direct download from the menu that drops when pushing the download button to the right.
In my case, that worked fine.
However, sometimes problems in downloading links from outside the browser relate to parameters other than the link itself. A common element that does not exist when you simply copy the link are the site cookies.
Try this cool FF add-on to get the correct wget
links
And also, especially if we are talking about a known workstation and not a casual one, you can of course install the Dropbox client. This will be the easiest way, just let your box be part of your file structure and eliminate the need of complicated downloads.
See this askubuntu.com post, and the Dropbox download page.
Dropbox has modified it so that wget
will do the right thing and retrieve the file instead of the interstitial.
Use "Share Link" to retrieve the direct link to the file.