?
Solved

How can i get the filesystem information for linux ?

Posted on 2000-05-16
3
Medium Priority
?
337 Views
Last Modified: 2010-04-22
I would like to know the function for getting filesystem information of linux( the information of superblock and cylinder group, the size of
 free inodes and blocks, etc) through some function of c language.

Which function can I use ? and how can i use the funtions ?

waiting for kindly answer.

Thanks and Best Regards,

BWLee
0
Comment
Question by:bwleeul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:bwleeul
ID: 2815654
Adjusted points from 50 to 100
0
 

Accepted Solution

by:
anandk101299 earned 400 total points
ID: 2820365
Check out the *stat* system calls.. For eg., statfs, fstatfs, stat, lstat etc.
I believe these calls shoudl give you what you want.

Anand .K
0
 

Author Comment

by:bwleeul
ID: 2820604
thanks, anandk.

I had test the function, statfs.

struct statfs buf;
int ret;

ret = statfs("/dev/hda1", &buf);

The value of ret was always -1.

what's the problem ?

bwleeul
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question