How to calculate the size of Google Drive folders
I was reaching my storage capacity for Google Drive and great was my surprise that you cannot see the size of folders in the user interface.
You can however, see how much space your folders take using the following procedure:
Create a new notebook
Click the Files icon and then click Mount Drive
Copy the following in a cell and click the play icon
! cd /content/drive/MyDrive/ ; du --apparent-size -csh * | sort -rh
Depending on the total size, this may take a while. It's also possible that some folders report 0 but that's likely because the script timed out. You can change the path from /content/drive/MyDrive/
to a specific folder like /content/drive/MyDrive/Photos
to see the size breakdown of that folder.