Tag Info

Hot answers tagged


My favorite solution uses a mix from several of these good answers. du -aBM 2>/dev/null | sort -nr | head -n 50 | more du arguments: -a for "all" files and directories. Leave it off for just directories -BM to output the sizes in megabyte (M) block sizes (B) 2>/dev/null - exclude "permission denied" error messages (thanks @Oli) sort arguments: ...


I have same question in coreutils mailing list, because it was hard to me to remember this weird command by @don.joey. And Bob Proulx proposed better, more natural command: du -ahd1 | sort -h If you want to list all of the files in the current directory then either use '.' or don't give it any file arguments at all. Also you may want to use the -d, ...

Only top voted, non community-wiki answers of a minimum length are eligible