How to access Dropbox through command lines in Linux

Source: Internet
Author: User
Tags oauth

How to access Dropbox through command lines in Linux

In today's multi-device environment, cloud storage is everywhere. No matter where you are, people want to use multiple devices to obtain the required content from cloud storage. Thanks to its beautiful UI and perfect cross-platform compatibility, Dropbox has become the most widely used cloud storage service. The popularity of Dropbox has led to the emergence of a series of official or unofficial Dropbox clients that support different operating system platforms.

Of course, the Linux platform also has its own Dropbox client: both command line and graphical interface clients. Dropbox Uploader is a simple and easy-to-use Dropbox command line client. It is written in the Bash script language (LCTT ). In this tutorial, I will describe how to use Dropbox Uploader to access Dropbox through the command line.

 

Installing and configuring Dropbox Uploader in Linux

To use Dropbox Uploader, You need to download the script and make it executable.

  1. $ wget https://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh
  2. $ chmod+x dropbox_uploader.sh

Make sure that you have installedcurlBecause Dropbox Uploader uses curl to run the Dropbox API.

To configure Dropbox Uploader, run dropbox_uploader.sh. When you run this script for the first time, it will request authorization so that the script can access your Dropbox account.

  1. $ ./dropbox_uploader.sh

As instructed, you need to access the https://www.dropbox.com/developers/apps page through a browser and create a new Dropbox app. Enter the information about the new app and enter the app name, which is similar to the app name generated by Dropbox Uploader.

After creating a new app, you will see the app key and app secret on the next page. Remember them.

Then, when dropbox is runningIn the terminal window of uploader. sh, enter the app key and app secret. Then dropboxUploader. sh will generate an oAUTH URL (for example, https://www.dropbox.com/1/oauth/authorize? Oauth_token = XXXXXXXXXXXX ).

Then access the oAUTH URL in the browser and agree to access your Dropbox account.

This completes the configuration of Dropbox Uploader. To check whether the Dropbox Uploader has been successfully authenticated, run the following command.

  1. $ ./dropbox_uploader.sh info
  1. DropboxUploader v0.12
  2. >Gettinginfo...
  3. Name:DanNanni
  4. UID: XXXXXXXXXX
  5. Email:my@email_address
  6. Quota:2048Mb
  7. Used:13Mb
  8. Free:2034Mb

 

Dropbox Uploader example

To display all the content in the root directory, run:

  1. $ ./dropbox_uploader.sh list

To list all the content in a specific folder, run:

  1. $ ./dropbox_uploader.sh listDocuments/manuals

To upload a local file to a remote Dropbox folder, use:

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

To download a remote file from Dropbox to a local device, use:

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

To download a complete remote folder from Dropbox to a local folder, run:

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

To create a new remote folder in Dropbox, use:

  1. $ ./dropbox_uploader.sh mkdirDocuments/whitepapers

To completely delete a remote folder (including all its contents) in Dropbox, run:

  1. $ ./dropbox_uploader.sh deleteDocuments/manuals

Ubuntu User Guide-how to switch to the Dropbox or Box cloud service after Ubuntu One is disabled

Put the Dropbox folder on the mobile hard disk in Ubuntu

Use Dropbox on CentOS

How to install Dropbox in Ubuntu 12.04

Install Dropbox In the Ubuntu Server command line Environment

Script For Linux backup to Dropbox

Solution for Ubuntu system failure to install Dropbox

Via: http://xmodulo.com/access-dropbox-command-line-linux.html

Author: Dan Nanni Translator: FSSlc Proofreader: Caroline

This article was originally compiled by LCTT and launched with the honor of Linux in China

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.