Need to know the users folder size

Hi Forum,

I need to know the size of some user home folders.

I've exported an account list from an Active Directory and wrote it into a file like:

user_1
user_2
user...
user_n

and tried "du -sh < filename", which doesn't work. Get no results.

I don't need the size of all home folders, only some, but at least 300.

du -sh {user_1,user_2...} works fine, but I don't want to set hundreds of commas. Well, could do it in Excel, but I'd like to do it in a more elegant way. :smiley:

Any suggestion how to do it better?

while read line; do du -sh $line; done < filename
du -sh $(<filename)

It works! Thanks! :slight_smile: