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 ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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 callsstatfs64.