LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to find what is filling up the space (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-find-what-is-filling-up-the-space-945068/)

linuxandtsm 05-15-2012 08:24 AM

How to find what is filling up the space
 
Hi all,

There is an NFS share on linux box and it is getting filled very fast. It is filling hundreds of GBs everyday. How can i find what is filling up the space ?
thanks in advance!

business_kid 05-15-2012 09:06 AM

du -sh /path-to-device/*

Also
lsof |grep path-to-device

TobiSGD 05-15-2012 09:21 AM

I prefer ncdu for such tasks. It should be available for almost any distribution and is quite handy, since its interactivity really can (and does) speed up to find the culprit.

linuxandtsm 05-15-2012 09:48 AM

thanks business_kid and TobiSGD,

will "ncdu" work on CentOS5/RHEL5 ? because i can't see it there on the ncdu page link.

TobiSGD 05-15-2012 09:51 AM

There are packages for ncdu: http://pkgs.org/centos-5-rhel-5/atom...86_64.rpm.html

linuxandtsm 05-15-2012 10:14 AM

thanks TobiSGD

but i got following error while trying to install ncdu
Code:

# yum install ncdu
Could not retrieve mirrorlist http://www.atomicorp.com/mirrorlist/atomic/centos-5-i386 error was
[Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Error: Cannot retrieve repository metadata (repomd.xml) for repository: atomic. Please verify its path and try again


TobiSGD 05-15-2012 10:15 AM

Sorry, I am no CentOS user, can't help with that.

linuxandtsm 05-15-2012 10:24 AM

Hi TobiSGD,

sorry my bad, i tried to install 64bit rpm on 32 bit. i installed it now

Code:

# rpm -qa | egrep 'atomic|ncdu'
atomic-release-1.0-14.el5.art
ncdu-1.5-1.el5.art

and now HOW TO USE this tool ?

TobiSGD 05-15-2012 10:54 AM

Just type
Code:

ncdu /path/to/your/share
It will begin to scan the path you have given to it recursively and displays the files/folders sorted by size. Navigate with the cursor keys, delete highlighted files/folders with the d-key, if you want.
For more info type
Code:

man ncdu


All times are GMT -5. The time now is 02:33 PM.