Disk Space Remaining

Thread Tools Search this Thread
Top Forums Programming Disk Space Remaining
# 1  
Old 10-22-2001
Network Disk Space Remaining

Does anyone know any C code to get the remaining disk space ?
# 2  
Old 10-23-2001

use stat() and then ustat()

see the man pages:

statfs(2) statfs(2)


statfs, fstatfs, ustat - Gets file system statistics

#include <sys/types.h>
#include <ustat.h>
int ustat(
dev_t device,
struct ustat *buffer );


Last edited by shaik786; 10-23-2001 at 03:41 AM..
# 3  
Old 10-23-2001
any other solutions

do you know of any solutions not using statfs() or ustat()
as my unix compiler isn't compatible with them.Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Disk Space

I know there are other threads but they have not helped. My server is running low on disk space and I haven't been able to re-allocate. I think my solaris machine is missing tools or the way it was originally setup, may not have the right pathing. $ df -k Filesystem kbytes used... (5 Replies)
Discussion started by: lnxjenn
5 Replies

2. Shell Programming and Scripting

Disk Space

HI ... I am New to the Unix...I am trying to write a script to check the disk space. But i am not able to write it. I know the command to check the disk space df -k,but unable to write the script..Can any body help me... Thanks in advance... (3 Replies)
Discussion started by: Kingkon
3 Replies

3. HP-UX

Disk Space

Hi Experts. I had 100% disk full , even though i have removed 2 GB space still dbf command shows 100%. How to rectify that. Appreciate your prompt help. Thanks (1 Reply)
Discussion started by: test10002
1 Replies

4. 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

5. Solaris

Disk space?

I'm a Unix newbie running Solaris 9. After installing a fresh copy on a 40GB drive I noticed the available disk space is 2% free or approximately 200MB available. Is that possible? Did I do something wrong? (4 Replies)
Discussion started by: jbarbuto
4 Replies

6. 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

7. UNIX for Dummies Questions & Answers

available disk space on disk device???

Hello, Can someone please tell me which command to use to determine the available disk space on a given disk device? I have to write a shell script that compresses files and stores them in a specific location but I am not sure how "conservative" I should be? Thanks in advance! Al. (4 Replies)
Discussion started by: alan
4 Replies

8. Filesystems, Disks and Memory

Disk Space -

I know I have posted this question before, but I still just don't understand how to determine disk space. This server is an IBM RS6000 running on AIX version 4.2.1. I in essence need to know the following if anyone can assist me. 1) I need to know how many drives are configured in the... (2 Replies)
Discussion started by: Docboyeee
2 Replies

9. UNIX for Advanced & Expert Users

Hard Dirve Space Remaining

Discussion started by: spu230479
4 Replies

10. UNIX for Dummies Questions & Answers

Out of disk space?

Hi I'm trying to install gcc and the installation program tells me that I'm out of disk space! I have just installed the os (using the default settings for partitions and sizes) and have only installed apache on the machine. Can it really be out of disk space already? How do I check how much... (4 Replies)
Discussion started by: alfabetman
4 Replies
Login or Register to Ask a Question