3

I want to find out the disk usage of /home however it's too slow, I get timeout sometimes (SSH) because it has lots of files. I am using du -sh /home and I was wondering if there's a faster way?

3
  • 7
    I don't think you'll be able to get a faster result. You can use screen to detach your session though and reconnect after the timeout. Use screen du -sh /home to run it, press 'CTRL+A' then 'd' to detach, and run screen -r after your timeout to renew the session.
    – Kasius
    Sep 24, 2012 at 14:40
  • Why not just run the command in the background as a job? Sep 24, 2012 at 15:27
  • Related post: How to cache or otherwise speed up du summaries?
    – Jan Berndt
    Feb 1, 2022 at 21:14

2 Answers 2

9

If you have /home on a separate partition you can use df -h to show the disk usage. This should be pretty fast since the command doesn't summarize the disk usage of each file (as du does).

0

Try this

df -kh

it will show disk usage. and if you want to see for all drives then use

sudo fdisk -l 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .