LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need Command to see free spaces (https://www.linuxquestions.org/questions/linux-newbie-8/need-command-to-see-free-spaces-504349/)

shipon_97 11-23-2006 09:42 PM

Need Command to see free spaces
 
Dear Friends ,

I want to know ,

1) Is there any command to see a particular folder size in Redhat Linux . Suppose I want to know /etc directory contains which amount of space in my HDD then which command I need to use .

2) Again If I want to see which service (Like samba service , proxy service, DHCP service etc) takes which amount of spaces
into my HDD partition then which command I use for this purpose.

Waiting for ur reply...........Thx .. ..

charle97 11-23-2006 09:46 PM

Quote:

Originally Posted by shipon_97
1) Is there any command to see a particular folder size in Redhat Linux . Suppose I want to know /etc directory contains which amount of space in my HDD then which command I need to use .

run the command:

du /etc

for more info:

man du

timmeke 11-24-2006 02:05 AM

1) Especially check out the -k, -h, -s and -c options of "du".
2) is more tricky, since the services can have files in any location on your disk (ie config files in /etc, programs in /sbin, ...). Why do you need this information exactly?
The only way I can think of is an approach like this:
* first get your package manager to list all files in the package of the service you're investigating.
* Then write a little script or something to get the file sizes and to display the total size.

More likely, though, it's not the services that are taking up all your disk space. Rather, it'll be all the software packages and multimedia files (pictures, movies, music) you put on the disk...

nx5000 11-24-2006 04:48 AM

xdiskusage is graphical

matthewg42 11-24-2006 08:50 AM

If you're running KDE, open the folder in konqueror and use the "file size view", which will show you exactly where your disk space is going. It's superb.


All times are GMT -5. The time now is 11:30 PM.