Content-type: text/html
df - Displays statistics on free disk space
[Compaq] The default behavior for the df command is BSD SVR4 compliant. In this case, the df command uses the following syntax: df [-eiknP] [-t fstype] [file|file_system...]
To cause the df command to exhibit XPG4 behavior, set the CMD_ENV environment variable to xpg4. In this case, the df command uses the following syntax: df [-eiknPt] [-F fstype] [file|file_system...]
The CMD_ENV environment variable also affects the behavior of the echo command. The BIN_SH environment variable affects the XPG4 compliance of the Bourne shell.
The
df
command displays statistics on the amount
of free disk space on
file_system
or on the file
system that contains the specified
file.
Interfaces documented on this reference page conform to industry standards as follows:
df: XPG4, XPG4-UNIX
Refer to the
standards(5)
reference page for more information
about industry standards and associated tags.
Displays information about the mounted file systems, including
the
automount
intercept point.
[Compaq] Displays statistics for the specified file system
type only. If the
no
prefix is used, all file systems,
except the one specified, are displayed. See the
-t
option
description for a list of available file system types.
[Compaq] Reports the number of free inodes. The number of
inodes controls the number of files that can exist in a file system.
Causes the numbers to be reported in kilobytes. By default,
all reported BSD compatible numbers are in 512-byte blocks.
[Compaq] Displays the previously obtained statistics from
all mounted file systems. Use this option if it is possible that one or more
file systems are in a state such that they will not be able to provide statistics
without a long delay (for example, if you have a remote file system on a server
that has crashed). If you specify the
-n
option, the
df
command does not request new statistics from the file systems;
for some remote file systems, the statistics displayed may be too obsolete
to be useful.
Produces output that consists of one line of information for
each specified file system, with reported numbers in 512-byte blocks (default).
Includes total allocated space figures in the output (default).
[DIGITAL (SVR4 only)] Displays statistics for only the specified
file system type. If the
no
prefix is used, all file systems,
except the one specified, are displayed. Available file system types include
the following:
[Compaq] UNIX File System (Berkeley fast file system) or
a swap partition
[Compaq] Network File System (NFS), Version 2 protocol
[Compaq] Memory File System (RAM Disk) (See mfs(8))
[Compaq] PC File System
[Compaq] System V File System
[Compaq] ISO 9660 or High Sierra Formatted (CD-ROM) File
System
[Compaq] DCE Distributed File System
[Compaq] DCE Episode File System
[Compaq] Process File System (used by debuggers)
[Compaq] Advanced File System (AdvFS)
[Compaq] File on File mount (used by streams)
[Compaq] File Descriptor File System (used by streams)
[Compaq] Reserved for third-party file systems
[Compaq] Network File System, Version 3 protocol
The name of a file, or file system, about which information is solicited.
[Compaq] To obtain XPG4 compliance, set the environment variable CMD_ENV to xpg4. If the environment variable is not set or it is set to another value, the environment defaults to BSD SVR4. If neither a file or a file system is specified, statistics for all mounted file systems are displayed.
[Compaq] When file system disk usage exceeds 100% of the allowed space
for users, the
df
command displays a negative number of
free blocks. The allowed space for users is typically 90% of disk capacity,
with 10% reserved for use by root only (this is not true for AdvFS, see below).
However, system administrators may specify either less or more reserved space
for use by root.
[Compaq] The root of the directory tree that contains the commands modified for SVID 2 compliance is specified in the file /etc/svid2_path. You can use /etc/svid2_profile as the basis for, or to include in, your .profile. The file /etc/svid2_profile reads /etc/svid2_path and sets the first entries in the PATH environment variable so that the modified SVID 2 commands are found first.
[Compaq] The
df
command, as modified for SVID 2
compliance, accepts one command line option (-t, print space
totals) and an optional file system name or device name. The command displays
the mount point, the mounted device, the number of free blocks (in 512-byte
quantities), and the number of free inodes. If the
-t
option
is specified, the command displays, on a separate line following the free
block counts, the total number of blocks and inodes for each mounted device.
[Compaq] For AdvFS file systems, the df command displays disk space usage information for each fileset. Because AdvFS uses a different design than UFS, the df command reflects disk space usage somewhat differently than UFS.
[Compaq] AdvFS uses a domain-fileset model rather than a one-file system-per-volume model like traditional UNIX file systems. A fileset can reside alone on a single-volume domain (a UFS model), alone on a multi-volume domain, or can share a single or multi-volume domain with other filesets. A fileset can consume all space in its domain or it may be constrained by fileset quotas.
[Compaq] AdvFS allows quotas to be established for filesets. Fileset quotas limit the amount of space that one fileset can use. For filesets that have quotas established, the 512-blocks, Avail, and Capacity values reflect limits imposed by quotas. They do not represent actual space available in the file domain unless there is less space in the domain than allowed by the quota limit. When both soft and hard limits are set, the lower limit is used to calculate totals.
[Compaq] The following is an explanation of each of the fields in the df command display for AdvFS file systems: [Compaq] The complete fileset name. The syntax is domain_name#fileset_name. [Compaq] The total amount of space in the file domain in which the fileset resides, represented in either 512K blocks or 1024K blocks. Metadata, which takes away space from the domain and is not available for filesets to use, is included as reserved in this total. This total represents: used+free+reserved.
The
Blocks
amount will never be the sum of the
used
and
available
figures, since it includes
metadata that is not included in either of the other two figures. The amount
of space used for metadata can be computed as
metadata
=
Blocks
- (used
+
available) but this figure has no validity beyond an accounting curiosity.
The
available
amount reflects space available for allocation
of new files and the metadata for these files. The amount of space used for
this metadata can not be predicted, since it is dependent on the way the space
is allocated (file, directory, or some other usage).
[Compaq] The
df
command supports mount point pathnames
of up to MNAMELEN, which includes the null terminating character.
The following exit values are returned:
Successful completion.
An error occurred.
The following environment variables affect the execution of
df:
[Compaq] This variable must be set to
xpg4
to cause the
df
command to exhibit XPG4 behavior.
Provides a default value for the internationalization variables
that are unset or null. If
LANG
is unset or null, the corresponding value from the default locale is used.
If any of the internationalization variables contain an invalid setting, the
utility behaves as if none of the variables had been defined.
If set to a non-empty string value, overrides the values of
all the other internationalization variables.
Determines the locale for the interpretation of sequences
of bytes of text data as characters (for example, single-byte as opposed to
multi-byte characters in arguments).
Determines the locale for the format and contents of diagnostic
messages written to standard error.
Determines the location of message catalogues for the processing
of
LC_MESSAGES.
Commands: du(1), echo(1), find(1), ksh(1), mount(8), quot(8), quota(1), Bourne shell sh(1b), POSIX shell sh(1p), showfdmn(8), showfsets(8)
Functions: fstatfs(2), mount(2), statfs(2)
Routines: getvfsbyname(3)
Standards: standards(5)