Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I really like to use xdiskusage on Ubuntu. It shows the disk usage of my files and folders in a handy way.

I've got Raspbmc installed on my Raspberry Pi, which doesn't have a X server. Thus, I cannot use xdiskusage on it. Is there any good CLI alternative to it?

share|improve this question
add comment

2 Answers 2

The du (diskusage) command is what you want.

du / Will show you the usage of every directory measured in blocks.

du --max-depth=1 -k / Will show the usage for the top level directories measured in Kb.

My favorite usage is: du --max-depth=1 / |sort -n

By piping the output to sort -n it will sort the list from least use to most.

Replace / in the examples with the top level directory you want to check.

share|improve this answer
    
This is a nice way to do it, too. Thanks. –  Exeleration-G Dec 28 '12 at 22:02
add comment
up vote 0 down vote accepted

I found a way to do this: ncdu.

SSH into the Raspberry Pi, then run the command ncdu / . This will show the disk usage in a xdiskusage way. You can navigate with your keyboard just like in xdiskusage.

By the way, I found that it's still possible to use xdiskusage without an X server on the Pi: ssh pi@<IP> 'cd /; du -k' | xdiskusage

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.