Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

find(1)

mount(1M)

statvfs(2)

default_fs(4)

mnttab(4)

vfstab(4)

environ(5)

df(1M)

NAME

df − report number of free disk blocks and files

SYNOPSIS

/usr/bin/df [ −F FSType ] [ −abegklntV ] [ −o FSType-specific_options ]

[ directory | block_device | resource ... ] /usr/xpg4/bin/df [ −F FSType ] [ −abegklnPtV ] [ −o FSType-specific_options ]

[ directory | block_device | resource ... ]

AVAILABILITY

/usr/bin/df

SUNWcsu

/usr/xpg4/bin/df

SUNWxcu4

DESCRIPTION

The df command displays the amount of disk space occupied by mounted or unmounted file systems, directories, or mounted resources, the amount of used and available space, and how much of the file system’s total capacity has been used. 

directory represents a valid directory name.  If directory is specified, df reports on the file system that contains directory. block_device represents a block special device (for example, /dev/dsk/c1d0s7); if block_device is specified, the corresponding file system need not be mounted.  resource is an NFS resource name. 

Used without operands or options, df reports on all mounted file systems. 

OPTIONS

The following options are supported:

−a Report on all filesystems including ones whose entries in /etc/mnttab (see mnttab(4)) have the ignore option set. 

−b Print the total number of kilobytes free. 

−e Print only the number of files free. 

−F FSType Specify the FSType on which to operate.  This is only needed if the file system is unmounted.  The FSType should be specified here or be determinable from /etc/vfstab (see vfstab(4)) have the by matching the directory, block_device, or resource with an entry in the table, or by consulting /etc/default/fs.  See default_fs(4). 

−g Print the entire statvfs(2) structure.  This option is used only for mounted file systems.  It cannot be used with the −o option.  This option will override the −b, −e, −k, −n, −P, and −t options. 

−k Print the allocation in kbytes.  The output consists of one line of information for each specified file system.  This information includes the file system name, the total space allocated in the file system, the amount of space allocated to existing files, the total amount of space available for the creation of new files by unpriviledged users, and the percentage of normally available space that is currently allocated to all files on the file system.  This option will override the −b, −e, −n, and −t options. 

−l Report on local file systems only.  This option is used only for mounted file systems.  It cannot be used with the −o option. 

−n Print only the FSType name.  Invoked with no operands, this option prints a list of mounted file system types.  This option is used only for mounted file systems.  It cannot be used with the −o option. 

−o FSType-specific_options
Specify FSType-specific options.  These options are comma-separated, with no intervening spaces.  See the manual page for the FSType-specific command for details. 

−P Same as −k except in 512-byte units. 

−t Print full listings with totals.  This option will override the −b, −e, and −n options. 

−V Echo the complete set of file system specific command lines, but do not execute them.  The command line is generated by using the options and operands provided by the user and adding to them information derived from /etc/mnttab, /etc/vfstab, or /etc/default/fs.  This option may be used to verify and validate the command line. 

OPERANDS

The following operands are supported:

directory represents a valid directory name.  df reports on the file system that contains directory.

block_device represents a block special device (for example, /dev/dsk/c1d0s7); the corresponding file system need not be mounted. 

resource represents an NFS resource name. 

EXAMPLES

The following example writes portable information about the /usr file system:

example% /usr/xpg4/bin/df −P /usr

Assuming that /usr/src is part of the /usr file system, the following will do the same as the previous example:

example% /usr/xpg4/bin/df −P /usr/src

ENVIRONMENT

See environ(5) for descriptions of the following environment variables that affect the execution of df: LC_CTYPE, LC_MESSAGES, and NLSPATH. 

EXIT STATUS

The following exit values are returned:

0 Successful completion. 

>0 An error occurred. 

FILES

/dev/dsk/∗ disk devices

/etc/default/fs
default local file system type. Default values can be set for the following flags in /etc/default/fs.  For example: LOCAL=ufs

LOCAL: The default partition for a command if no FSType is specified. 

/etc/mnttab mount table

/etc/vfstab list of default parameters for each file system

SEE ALSO

find(1), mount(1M), statvfs(2), default_fs(4), mnttab(4), vfstab(4), environ(5)
Manual pages for the FSType-specific modules of df. 

NOTES

The −F option is intended for use with unmounted file systems. 

This command may not be supported for all FSTypes.

SunOS 5.5.1  —  Last change: 28 Feb 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026