1

In Windows I could easily do this by navigating the directory tree and looking at the sizes. But in Linux, you need to run a command and, what's worse, it takes a lot of time:

$ du -sh /some/dir

I'm using a disk of 1 TB, but for some reason I only have like 50 GB left, and I can't seem to find what's taking so much space.

I remember that in Ubuntu I had to manually remove old kernel images. But now I'm on Fedora and dpkg -l | grep linux-image doesn't work, and I guess Fedora removes them automatically anyway.

Any ideas?

ChocoDeveloper
  • 2,767
  • 9
  • 30
  • 41

2 Answers2

3

You can try to find big files in your disk with a command such as:

find . -size +100M -type f -exec ls -lh {} \;

In this example, only files with 100 Mega Bytes (units of 1048576 bytes) or more are displayed. That value can be tweaked as you please.

Luis
  • 710
  • 8
  • 13
  • btw - since you want to avoid processing `/proc` .. I made the following adjustment to your command: `for dname in *; do if [ $dname != "proc" ]; then find $D -size +10M -type f -exec ls -lh {} \;; fi; done` (presumes running from `/`) – warren Jun 06 '14 at 02:50
1

You can use this

$ du -h --max-depth=1  

You can use with tree also

tree -h >> file    
Gangadhar
  • 401
  • 2
  • 6