DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

df(C)


df -- report number of free disk blocks

Syntax

df [ -B | -I | -P | -iv | -t ] [ -fklQ ] [ filesystem ... ]

Description

df reports the number of free blocks and free inodes available for on-line filesystems by examining the counts kept in the super-blocks. You can specify the filesystems to be examined using their device name (for example, /dev/root). If the filesystems are not specified, df writes the free space on all mounted filesystems to the standard output.

Mounted filesystems are listed in /etc/mnttab.

Options

The first set of options select the output format. They may not be combined except -i and -v. If none of the options are selected, df reports the number of free blocks and inodes.

-B
Use portable XPG4/POSIX2 output formatting (as for option -P) but do not truncate the filesystem device name.

-i
Report the percent of inodes used as well as the number of inodes used and free. Use the -i option with the -v option to display counts of blocks and inodes free as well as the percentage of inodes and blocks used.

-I
Report inode information using the same format as the -B option.

-P
Use portable XPG4/POSIX2 output formatting. The first line of the output is a header that includes the block size. Lines following the header show the following information for each filesystem: device name, total space, space used, free space, percentage of space used, and mount point.

-t
Reports the file system's total size in blocks, total number of inodes, and total number of free blocks and inodes that are currently free.

-v
Report the percent of used blocks as well as the numbers of used and free blocks.

The remaining options are used to modify these formats:


-f
Report only an actual count of the blocks in the free list (free inodes are not reported). With this option, df reports on raw devices.

-k
Report blocks as 1024-byte logical blocks instead of default 512-byte physical blocks.

-l
Report local resources only.

-Q
(Quick). Suppress sync(S) operations. This gives faster, but potentially inaccurate, results.

Exit values

df returns 0 on successful completion, or a value greater than 0 if an error occurred.

Diagnostics

Errors may occur for the following reasons:

Examples

The following example writes portable information about the /u filesystem:

df -P /u

Limitations

If the -k option is not specified, df reports filesystem usage in 512-byte physical blocks. The filesystem, however, allocates logical blocks of size 1024 bytes to files. If a file of size 500 bytes is created, df reports 2 blocks less free space (rather than 1 block), since the filesystem allocates one 1024-byte block to the file.

df prints the actual block size reported when the -B or -P option is used.

Also see ``Limitations'' under mount(ADM).

Authorization

The behavior of this utility is affected by assignment of the queryspace authorization for the backup subsystem in authorize(F). Refer to subsystem(M) for more details.

Differences between versions

The -Q (quick) option is provided only for SCO OpenServer Release 5.0.6 and later. For releases prior to SCO OpenServer Release 5.0.6, the -f and -l options are ignored when used with -B, -I, and -P; the -B and -P options cannot be used with any other options except -k, and the -I option cannot be combined with any other.

Files


/dev/*

/etc/mnttab

See also

du(C), fsck(ADM), mnttab(F), mount(ADM), quot(ADM)

Standards conformance

df is conformant with:

ISO/IEC DIS 9945-2:1992, Information technology - Portable Operating System Interface (POSIX) - Part 2: Shell and Utilities (IEEE Std 1003.2-1992);
AT&T SVID Issue 2;
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992.


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003