Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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 cli_client.py. 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.