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.
$ wget https://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh
$ chmod+x dropbox_uploader.sh
Make sure that you have installedcurl
Because 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.
$ ./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.
$ ./dropbox_uploader.sh info
DropboxUploader v0.12
>Gettinginfo...
Name:DanNanni
UID: XXXXXXXXXX
Email:my@email_address
Quota:2048Mb
Used:13Mb
Free:2034Mb
Dropbox Uploader example
To display all the content in the root directory, run:
$ ./dropbox_uploader.sh list
To list all the content in a specific folder, run:
$ ./dropbox_uploader.sh listDocuments/manuals
To upload a local file to a remote Dropbox folder, use:
$ ./dropbox_uploader.sh upload snort.pdf Documents/manuals
To download a remote file from Dropbox to a local device, use:
$ ./dropbox_uploader.sh download Documents/manuals/mysql.pdf ./mysql.pdf
To download a complete remote folder from Dropbox to a local folder, run:
$ ./dropbox_uploader.sh download Documents/manuals ./manuals
To create a new remote folder in Dropbox, use:
$ ./dropbox_uploader.sh mkdirDocuments/whitepapers
To completely delete a remote folder (including all its contents) in Dropbox, run:
$ ./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: