2014-06-24

Linux command to check current path only all subfolder's size.


Source URL: http://blog.satisheerpini.net/2010/01/du-with-single-level-directory.html




du -h --max-depth=1





January 16, 2010


"du" with single level directory traversal

I always used du to know the size used up by the files in a particular directory, mostly recursively. But there were sometimes when I wanted to know the directory and file sizes upto only one level. May be "man du" would have helped, but as most *nix users are, I was lazy to do that. While reading a forum thread about the same question here , I came across the solution :

"du --max-depth=1"

and of course adding the "-h" switch would print the sizes in human readable form.
























Google Referrals