PDA

View Full Version : TIPS: How to discover large files "no space on /dev/md2/sda1 full



Fli
04-23-2013, 09:00 AM
Hi, maybe you ran into problems with disk space on your partitions:

Sample errors:
Filesystem Warning: Filesystem / (/dev/sda1) on *** is using 91%
"no space on / " .../dev/md2 @ 100%...
and similar

FIXING, Discovering large files

This linux command (CLI, SSH) shows 15 largest files on server in "/". Sort them recursivelly and sort them according to size. Source of this command here (http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/). Thanks to this, you can discover largest files.

du -a / | sort -n -r | head -n 15


This one is also good, shows largest directories:

find . -type d -print0 | xargs -0 du -s | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
from the folder you are in. source of this command: here (http://superuser.com/questions/9847/linux-utility-for-finding-the-largest-files-directories)

This will tell you partitions disk space usage

df -h