tags:

views:

62

answers:

2

I am looking for a linux api that returns me information about root filesystem.

I can use command stat -f / to get information about root filesystem. Is there any API that returns exactly same information as returned by "stat -f" command ?

+1  A: 

statvfs

Drakosha
can that be used as a regular non-root user?
i think it can.
Drakosha
A: 

Next time when you need to know API than does the same thing like a shell command you can use strace. Like this: strace stat -f / and see what calls do command. On my system it calls statfs64.

skwllsp