Before I move or back up a cloud folder, I want to know how big it is. Clicking through a web interface is slow, and rclone size answers in one line.
rclone size remote:photos
It counts the objects at the path and prints the total size and the number of objects. It recurses by default, so add --max-depth 1 if you only want the top level. For scripts, --json prints the result as JSON.
rclone size remote:photos --json --min-age 30d
The usual filter flags apply, such as --min-size, --max-age and --exclude, so you can measure just a slice of a remote. On big remotes --fast-list can help, at the cost of more memory.
One caveat from the docs: some backends don’t report file sizes, with Google Photos and Google Docs as examples. rclone logs a notice with the number of such files and counts them as empty, so the total can be lower than reality. The command exists since v1.23.
For a visual overview there is also rclone ncdu, and rclone tree for a listing. The size command is the one to put in a script, since it prints one result and exits.
Further reading: rclone size