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 https://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh
$ chmod +x dropbox_uploader.sh

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 www.developers.dropbox.com and create an app with full Dropbox access !

 

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

$ ./dropbox_uploader.sh

Go to your terminal, you will see this,

app-key

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:-

$ ./dropbox_uploader.sh info

Dropbox uploader examples:-

To list all contents in the top-level directory:

$ ./dropbox_uploader.sh list

To list all contents in a specific folder:

$ ./dropbox_uploader.sh list Documents/manuals

To upload a local file to a remote Dropbox folder:

$ ./dropbox_uploader.sh upload snort.pdf Documents/manuals

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

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

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

$ ./dropbox_uploader.sh download Documents/manuals ./manuals

To create a new remote folder on Dropbox:

$ ./dropbox_uploader.sh mkdir Documents/whitepapers

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

$ ./dropbox_uploader.sh delete Documents/manuals

Thats it, Enjoy !

[via:- xmodulo and askubuntu].

By Akash Angle

I am a Full time Linux user who has quit using Windows for unknown reasons, making my life truly open source.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x