Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using CentOS. Is there a way to get the unused space in my Dropbox account using the command line?

share|improve this question
You would have thought the Official Dropbox Command Line Interface (CLI) would have an option to query the free space but unfortunately it doesn't. – Rik Dec 10 '13 at 14:47

You can use the Dropbox API to get your current usage. Download the Python SDK (and make sure you have Python installed). In the examples folder of the SDK there is a Edit that file with your developer keys and then use the "account_info" command to see your usage.

share|improve this answer

There does not seem to be an official solution for this. You can however use du to find out the size of your Dropbox folder and calculate how much space you have left from that.

Some example scripts doing a similar thing can be found on this page. Just calculate the difference instead of the percentage.

I would use du -cLl $HOME/Dropbox instead of du -c $HOME/Dropbox. This way symbolic links and hardlinks are counted correctly.

Also note that this solution only works if you sync your complete Dropbox on the PC in question. If you use selective sync, you must approximate the space used by folders not present on this system. This makes the system unreliable. As a workaround you could have a cronjob that writes the sizes of other folders into a file in your dropbox and use this file for your calculations.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .