Solved

How can i get the filesystem information for linux ?

Posted on 2000-05-16
3
325 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 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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Percona cluster member randomly crash 15 545
updating the repos in yum 4 121
unable to put logic for reading multiple repo in a single file 4 72
awk to variable in bash 2 113
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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