Sponsored Content
Full Discussion: Disk Space Remaining
Top Forums Programming Disk Space Remaining Post 9100 by shaik786 on Tuesday 23rd of October 2001 02:39:06 AM
Old 10-23-2001
hi!

use stat() and then ustat()

see the man pages:


statfs(2) statfs(2)

NAME

statfs, fstatfs, ustat - Gets file system statistics

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


Regards
Shaik

Last edited by shaik786; 10-23-2001 at 03:41 AM..
shaik786
 

10 More Discussions You Might Find Interesting

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

2. UNIX for Advanced & Expert Users

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. (4 Replies)
Discussion started by: spu230479
4 Replies

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

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

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

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

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

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

10. 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
disksecn(1M)															      disksecn(1M)

NAME
disksecn - calculate default disk section sizes SYNOPSIS
block_size] [-n disk_name] DESCRIPTION
is used to calculate the disk section sizes based on the Berkeley disk partitioning method. recognizes the following options: Produce tables suitable for inclusion in the device driver. Produce tables suitable for generating the disk description file When generating the above tables, use a sector size of block_size bytes, where block_size can be or Defaults to DEV_BSIZE (defined in if not specified. Specifies the disk name to be used in calculating sector sizes; for example, or If an unknown disk name is specified, prompts the user for the necessary disk information. If neither nor table selection switches are specified a default table of the section sizes and range of cylinders used is output. Disk section sizes are based on the total amount of space on the disk as given in the table below (all values are supplied in units of 256-byte sectors). If the disk is smaller than approximately 44 Mbytes, aborts and returns the message Section 44-56MB 57-106MB 107-332MB 333+MB 0 97120 97120 97120 97120 1 39064 39064 143808 194240 3 39064 39064 78128 117192 4 unused 48560 110096 429704 6 7992 7992 7992 7992 10 unused unused unused 516096 Note It is important to note the difference between the block size passed into via the switch argument and the sector size the user is asked to input when an unknown disk name is passed to via the switch argument. The block size is the sector size that assumes the disk to have when it prints the requested tables. All information printed in the tables is adjusted to reflect this assumed sector size (block size) passed in by the user. The sector size requested by when an unknown disk name is passed does not necessarily have to be the same as the assumed sector size (block size) passed in by the switch argument. For example, a user wants to see the device driver tables for the disk named with an assumed sector size (block size) of 256 bytes. The user has the following information about the disk: Disk type = winchester Sector size = 512 Number of sectors per track (512 byte sectors) = 16 Number of tracks = 7 Number of cylinders = 968 Revolutions per minute = 3600 The user invokes by typing the following command: Assuming that is an unknown disk name, prompts the user for the necessary disk information. The user should input the information as shown above, reflecting a sector size of 512 bytes. All the information will be adjusted within to reflect the assumed sector size (block size) of 256 bytes, passed as the argument of the switch, before the requested device driver table is output. This adjustment also takes place when the disk name is known and an assumed sector size (block size) is passed in as the argument of the switch which is not DEV_BSIZE bytes, the assumed sector size (block size) used to create the file. RETURN VALUE
returns the following values: Successful completion. Usage error. User did not input parameters for an unknown disk. Disk too small or an invalid block size. aborts and prints an error message under the following conditions: o was invoked without specifying a disk name. o Requested both and switch. o Illegal block size requested. o Unknown disk name was specified and user did not supply disk information. o Disk's maximum storage space is less than approximately 44 MB. WARNINGS
Alternate names are not included in the output when the switch is used. Blanks are required in the command line between each of the switches when invoking A blank is required between the switch and the disk name argument to that switch. For example: does not save the block size used to generate the disk description file. The system assumes that the block size used was DEV_BSIZE when it reads the information stored in the file. AUTHOR
was developed by the University of California, Berkeley. FILES
SEE ALSO
disktab(4). Servers Only disksecn(1M)
All times are GMT -4. The time now is 03:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy