Access Dropbox via CLI (terminal) in Linux !

Dropbox, one of the leading cloud storage provider on the planet has more then 400 million registered users and most of them are free and by default Dropbox provides free 2 Gb space. As of now for every referral the user gets free 500 Mb + the other users too gets this benefit, as of now there are other options too for getting the free space, like linking to the Mailbox and Carousel accounts etc, (note at the time of writing both the apps viz. Mailbox and Carousel are going to shutdown as announced in a blog post by Dropbox).

The popularity of Dropbox has led to a plethora number of official and unofficial Dropbox clients that are available for cross platform users. Here we are going to discuss a basic Dropbox uploader, and a BASH script to access via the CLI(Command Line Interface) in/via the Linux terminal.

First things first:-

Fire up the terminal and paste the below given commands.

$ wget
$ chmod +x

Make sure that curl is present/installed on your system, if not just type in Ubuntu/Debian,

sudo apt-get install curl

To access the Dropbox, just run the uploader script, for the first time it will ask you for the access of you Dropbox account.

But before you do that please visit and create an app with full Dropbox access !


Post that run the script as shown below in your terminal,

$ ./

Go to your terminal, you will see this,


Enter the App key and the App secret(note that app secret cannot be copied, it has to be manually typed).

Now go to the URL as mentioned above in the screenshot(pixalated one) and you will be up and running in no time.


This successfully completes the required Dropbox uploader requirements and just in order to confirm the authentication, copy paster below:-

$ ./ info

Dropbox uploader examples:-

To list all contents in the top-level directory:

$ ./ list

To list all contents in a specific folder:

$ ./ list Documents/manuals

To upload a local file to a remote Dropbox folder:

$ ./ upload snort.pdf Documents/manuals

To download a remote file from Dropbox to a local file:

$ ./ download Documents/manuals/mysql.pdf ./mysql.pdf

To download an entire remote folder from Dropbox to a local folder:

$ ./ download Documents/manuals ./manuals

To create a new remote folder on Dropbox:

$ ./ mkdir Documents/whitepapers

To delete an entire remote folder (including all its contents) on Dropbox:

$ ./ delete Documents/manuals

Thats it, Enjoy !

[via:- xmodulo and askubuntu].