Re: finding how much the file system is full, from a C program?



On Mon, 30 Oct 2006 06:46:20 UTC, prasadjoshi124@xxxxxxxxx wrote:

Hi All,

I am writing a small tool which is supposed to fill the filesystem to a
specified percent.

For, that I need to read how much the file system is full in percent,
like the output given by df -k

lopgod10:~/mycrfile # df -k /mnt/mvdg1/vset
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vx/dsk/mvdg1/vsetdg1
1536000 349854 1112370 24% /mnt/mvdg1/vset

How can I do it from a C program.

You can't do that with portable C. You would go to a programmer group
related to your OS and ask there - or much simpler get the
documentatzion of your C compiler or better the C library coming with
your OS and look for a system specific API.

--
Tschau/Bye
Herbert

Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2 Deutsch ist da!
.