Hard Dirve Space Remaining


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Hard Dirve Space Remaining
# 1  
Old 10-16-2001
Network Hard Dirve Space Remaining

DOES ANYONE KNOW IF THERE IS ANY C CODE YOU CAN USE WITHIN UNIX TO FIND THE REMAINING DISK SPACE ON A HARD DRIVE.
# 2  
Old 10-16-2001
You can use the statvfs() system call to get statistics about file systems. That's the one to use.

Your os may support earlier system calls like statfs() or ustat(). I would avoid these and use the more modern statvfs().
# 3  
Old 10-16-2001
THANKS

DO YOU KNOW WHERE YOU CAN FIND EXAMPLES OF HOW TO USE THESE FUNCTIONS???
# 4  
Old 10-17-2001
you can use:

<pre>

df

and

df -k

</pre>

these commands will sort you out
Good luck
# 5  
Old 10-17-2001
try using df -v to show your used & remaining space of all your filesystems. this works in SCO unix - not sure about other versions
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Fedora

Need to incrwase PHYSICAL VOLUME space on hard drive with free space on it

Hi, I run Fedora 17. I created a physical volume of 30GB on a disk with 60GB of space so there is 30GB of free space. On the physical volume, I created my volume group and logical volumes. I assigned all the space in the physical volume to my volume group. I need to add the 30GB of free space... (1 Reply)
Discussion started by: mojoman
1 Replies

2. SCO

Add memory and EDI hard disk space

Dear all I would like to know if you have face to the problems as add 1. 256 MB DDR Ram memory 2. IDE 40 GB slaved hard-disk my current machine is GA-SIML Rev 1.0, 1.6 GHz CPU, 1GB HDD, 256 MB DDR-Ram memory, as I add another 256 DDR-Ram, and 40 GB Slaved EDI Hard disk it, the systems... (1 Reply)
Discussion started by: TinhNhi
1 Replies

3. Shell Programming and Scripting

Need help on Linux script to monitor hard drive space

I'm new to Linux and have very limited experience with shell scripts in general. I am taking a class and I have to research online and come up with a shell script that monitors disk space. I also have to be able to explain it line by line. I've researched various sites and came across this shell... (3 Replies)
Discussion started by: wgreg23
3 Replies

4. Solaris

How to utilize the 2nd hard disk space in x86 solaris 5.10

I have 2 hard disks ,one hard disk(40gb) completely for windows Os,and the other(120gb) for solaris Os. In the second hard disk.I have utilised around 10gb for the solaris installation and also partitioned with the available 10gb space for the solaris x86 OS. Now i need to utilise the... (8 Replies)
Discussion started by: jayaprakash
8 Replies

5. UNIX for Dummies Questions & Answers

Hard Disk drive space gone missing...

Sorry if this is totally the wrong place to post this but I have a question or something rather thats bugging me. I got a new Dell Inspiron laptop the other day and I was expecting it to have 80G on it, well atleast 70 or so after installation of OS and such but after looking carefully yesterday, I... (8 Replies)
Discussion started by: Ecclesiastes
8 Replies

6. UNIX for Dummies Questions & Answers

Re-allocating hard drive space

Hi, Is their an easy way to realloate hard drive space on Solaris 10. For example : /c20td0 10G /space 90 G I would like to move some of the hard-drive space from "/space" and add it to "/c20td0". In Windows this can be easily done using Partition magic, anything similar for UNIX? (4 Replies)
Discussion started by: annointed3
4 Replies

7. Shell Programming and Scripting

Scripts for calculating size and remaining space of a directory automatically.

I would like to create a script for calculating size and remaining space of a directory automatically every 24 hours, then send an email to report to the admin. * POSIX and PERL are preferred. Can anyone help, please? (1 Reply)
Discussion started by: leonall
1 Replies

8. Linux

How to access mapped dirve in Linux

i want to access mounted/mapped drive in linux using C code is it possible to access the mapped drive in linux using C code ? waiting for replay NIrav (0 Replies)
Discussion started by: niravuchat
0 Replies

9. HP-UX

Remaining Space After Mirroring

My HP9000 has 10 disks of 9.1 GB each. With help of the fpmurphy (thank you) it is knowing that 8 of them are mirrored (using lvdisplay). What should i do to know which is the existent free space after mirroring. Regards (1 Reply)
Discussion started by: cgege
1 Replies

10. Programming

Disk Space Remaining

Does anyone know any C code to get the remaining disk space ? (2 Replies)
Discussion started by: spu230479
2 Replies
Login or Register to Ask a Question