Drupal - File Usage MySQL Queries
Category:
Here are a few helpful MySQL queries to retrieve file usage in Drupal (perhaps via IMCE or other file management module).
Total File Space Used by a Particular User
select SUM(filesize) as total_space from {files} where uid = 123;
Total File Space Used by a Particular Directory
select sum(filesize) as total_size from {files} where filepath like '%files\/my_sub_dir\/my_other_sub_dir%';