Solved

How can i get the filesystem information for linux ?

Posted on 2000-05-16
3
318 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
  • 2
3 Comments
 

Author Comment

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

Accepted Solution

by:
anandk101299 earned 100 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

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…
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now