0

I'm running Redhat 6.6 and experienced a power failure over the holiday weekend. The / partition is showing 100% full. How do I check to see which files are actually causing the overusage?

[root@sms1 ~]# df -H
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_sms1-lv_root
                       53G   51G     0 100% /
tmpfs                  34G     0   34G   0% /dev/shm
schaiba
  • 7,631

2 Answers2

0

du -sh * from / will give you the top level directory using the most space, but it might not be very quick.

Once you have a good candidate, you can change into that directory, and do another du -sh * to see which has the most content, and drill down.

Or, you could use find and specify a file size if you think it's one big file that's causing the issue. This command finds all files over 500MB starting in / and working down the full directory tree.

find / -type f -size +500000k -exec ls -lh {} \;

EightBitTony
  • 21,373
0

Look for the directories with the largest consumption:

du -kx / | sort -rnk1,1

This reports in 1K blocks, sorted from highest to lowest usage. The '-x' option prevents crossing mountpoints.

JRFerguson
  • 14,740
  • [root@ ]# du -kx / | sort -rnk1,1 | more 25569866 / 15335332 /var 8625364 /var/www 8624148 /var/www/html 8619396 /var/www/html/images

    This shows that / has used the most blocks, which I already know. I'm needing to figure out what I can delete to free up the space.

    – Gene Brotherton Dec 02 '15 at 15:53
  • You need to assess subordinate directories (like '/var/www/' that constitute significant usage). You are not concerned with the '/' directory (obviously). – JRFerguson Dec 02 '15 at 16:28