1

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 
0

2 Answers 2

1

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 {} \;

1
  • 1
    I found some huge .gz files in /store. Removing those recovered enough space to start mysqld for now. Thanks! Commented Dec 2, 2015 at 15:59
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.

2
  • [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. Commented Dec 2, 2015 at 15:53
  • You need to assess subordinate directories (like '/var/www/' that constitute significant usage). You are not concerned with the '/' directory (obviously). Commented Dec 2, 2015 at 16:28

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.