I have 2 folders that have subfolders (named after users), most subfolders exists in both folders, but not all. Now I want to create a list of space used by each user.
I can use the following command to get a list for each folder,
du -m --max-depth=1 | sort -nr
but I don't know an easy way to merge two of these lists. Not all users have a folder in both places, so simple sorting does not work. Any idea on how to sum up the folder sizes for each user?