[GLLUG] Size of a directory

Stuart Sears stuart at sjsears.com
Tue Oct 30 16:35:47 UTC 2012


On 30/10/12 16:30, John Winters wrote:
> On 30/10/12 14:51, John G Walker wrote:
>> I'm being told that I'm running out of disk space in my home directory.
>> I don't believe this, but how do I check?
>>
>> I di know but I've forgotten,
>
> cd ~
> du -s * | sort -rn | head
>
> will identify the space hogs quickly.

as an addendum, modern versions of 'sort' also have a '-h' option which 
can sort on ISO units

[lanky at ultra ~]$ du -sh *| sort -hr | head
15G	Music
7.2G	Downloads
1.8G	Pictures
1.6G	Documents
693M	Dropbox
4.0M	rubygems
2.6M	maillog.1
1.1M	rpmbuild
604K	dump
520K	dump.tar

etc etc



Stuart

-- 
Stuart Sears RHCA etc.
"It's today!" said Piglet.
"My favourite day," said Pooh.




More information about the GLLUG mailing list