A chronological documentation test project, nothing serious, really!

23 Jun 2008 Oneliner to determine directory size

Posted by

This is a simple oneliner to determine which user has used most diskspace in their /home directory

du -sm $(find /home -type d -maxdepth 1 -xdev) | sort -g

The result could look something like this

215     /home/userT
1367    /home/userB
10865   /home/userL
25326   /home/userY
116328  /home/userH
154426  /home/

The numbers to the left is size i MB.


Comments are closed.