Ubuntu – Use Wget to download a file from the Ubuntu One Account/ Online Storage

ubuntu-onewget

Is there any way to use wget to download a file from my Ubuntu One Account/Online Storage?

say I try wget http://ubuntuone.com/p/14bm/ it should download the file called "wget-u1-test-doc.txt" but all I get is a file index.html.

for now I'm using a dropbox account to do this job instead of ubuntu one.

I'm playing around with some post install scripts {I'm trying to teach myself some things} on ubuntu in virtualbox oneiric and natty so I may install ubuntu then after a while do a clean install and start from fresh. the scripts mainly just download and install customized .desktop files for the unity launcher and put them in the right places. this is so I don't have to keep doing it manually every time. and I find it a fun way to learn not only scripting but ubuntu as well.

Best Answer

  • Use wget's --content-disposition option:

    $ wget -nv --content-disposition http://ubuntuone.com/p/14bm/
    2011-07-15 17:31:47 URL:http://ubuntuone.com/p/14bm/ [143/143] -> "wget-u1-test-doc.txt" [1]