I have the following command that shows me the total size of folders and subfolders :
du -hs *| sort -n
result:
1.0M sandeep
1.4G sandy
1.4M important
1.6M files
but I will need to know the size of folders and its subfolders( not size of individual files though) with the Owner who created this folders and subfolders.
Do you know the users you will be needing this information for?
for u in alice bob charlie diana elmer; do
echo === $u ===
find . -type d -user $u | xargs du -sh
done
In theory, there's nothing to prevent alice from being the owner of a file in a folder which bob created, if the permissions allow this. In practice, of course, perhaps you can rule out or just ignore this.