![]() |
|
#1
|
|||
|
|||
How many partition on hard disk?Hi , i want to know how many partition on hard disk in linux using c program ?
Does any body have idea about this , please give me any idea abt this. |
|
#2
|
|||
|
|||
Re: How many partition on hard disk?Quote:
You can try something like: Code:
You can easily just read (using fopen) the /proc/partitions file and parse out the partitions very simply. Here is an example: CPP / C++ / C Code:
Output: Code:
:davis: |
|
#3
|
|||
|
|||
Thanks for ur kind reply!Respected Davis,
Thanks for ur reply , but actually i want this information without /proc file system. The one thing i have done is i have used the object of structure statfs. But now how to get all the partition information that i don't have idea. If u have any suggestion then please tell me, but it should be without /proc file system. Waiting for ur reply. Quote:
|
Recent GIDBlog
2nd Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find size of hard disk | ajeshjohn | C Programming Language | 4 | 23-Jun-2006 02:15 |
| Selling Server | darkneal128 | Managed / Dedicated Servers | 4 | 28-Mar-2006 17:01 |
| Hard disk serial number | ameynirgude | C Programming Language | 1 | 20-Nov-2005 05:55 |
| How to Remove Host Protected Area (HPA) of (ATA) Hard disk in windows with API calls? | nagamohan_p | MS Visual C++ / MFC Forum | 0 | 27-Sep-2005 23:27 |
| Hard disk problem!! | jack21 | Computer Hardware Forum | 2 | 17-May-2004 10:03 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The