Dropbox Uploader is a bash script to access your Dropbox cloud storage. It is quite handy for people who don’t want keep all their files synced locally all the time. Perhaps the best advantage is a user can run the script as a cron job periodically. The script uses curl which is available on all major Linux distros. It uses API’s exposed by Dropbox. Even authentication is done using Dropbox API so the credentials are not locally. Users can do much more than just upload, download, delete or list files with Dropbox Uploader.

The author has also written an interactive Dropbox Shell based on the Dropbox Uploader script.

Features

Cross platform

Support for the official Dropbox API

No password required or stored

Simple step-by-step configuration wizard

Simple and chunked file upload

File and recursive directory download

File and recursive directory upload

Shell wildcard expansion (only for upload)

Delete/Move/Rename/Copy/List files

Create share link

Installation

Download the scripts using curl and place it in /usr/bin:

$ curl "https://raw.githubusercontent.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh" -o dropbox_uploader.sh $ curl "https://raw.githubusercontent.com/andreafabrizi/Dropbox-Uploader/master/dropShell.sh" -o dropShell.sh $ chmod +x dropbox_uploader.sh $ chmod +x dropShell.sh $ sudo mv dropbox_uploader.sh dropShell.sh /usr/bin

Usage

To configure Dropbox Uploader the first time, run:

$ dropbox_uploader.sh

A configuration wizard will take you through the next steps. The configuration is saved in ~/.dropbox_uploader. During selecting the permissions, give permission to all Dropbox files. Otherwise you’ll end up inside the App folder.

To start DropShell, run:

$ dropShell.sh

Once you are inside the shell, run help for list of supported commands.

Options supported by dropbox_uplaoder.sh:

Syntax: dropbox_uploader.sh COMMAND [PARAMETERS]... Commands : <%%>: Required param [%%]: Optional param upload download [local_dest] delete move copy mkdir list [remote_dir] share info //print Dropbox account info unlink //unlink the script from Dropbox account Optional parameters : -f : load config from file -s : skip existing files (default is overwrite) -d : debug mode -q : quiet mode //don't show progress meter or messages -p : show curl progress bar -k : no SSL certificate check

Examples:

$ dropbox_uploader.sh upload /etc/passwd /myfiles/passwd.old $ dropbox_uploader.sh upload * .zip / $ dropbox_uploader.sh download /backup.zip $ dropbox_uploader.sh delete /backup.zip $ dropbox_uploader.sh mkdir /myDir/ $ dropbox_uploader.sh upload " My File.txt " " My File 2.txt " $ dropbox_uploader.sh share " My File.txt " $ dropbox_uploader.sh list

Keep the following in mind when you want to add the script as a cron job:

Each user (including root) has her own config file ~/dropbox_uploader. Remember to setup the script with the user used to run the cron job

Use the -f option to specify the full config file path.

For security, do not use the same config file for multiple users.

Webpage: Dropbox Uploader