System Administration Commands df ( 1M )

NAME df – displays number of free disk blocks and files SYNOPSIS /usr/bin/df [-F FSType] [-abeghklntV] [-o FSType-specific_options] [block_device  directory  file  resource ...] /usr/xpg4/bin/df [-F FSType] [-abeghklnPtV] [-o FSType-specific_options] [block_device  directory  file  resource ...] DESCRIPTION The df displays the amount of disk space occupied by mounted or unmounted file systems, the amount of used and available space, and how much of the file system’s total capacity has been used. The file system is specified by device, or by referring to a file or directory on the specified file system. Used without operands or options, df reports on all mounted file systems. df may not be supported for all FSTypes. If df is run on a networked point that the automounter has not yet mounted, the file system size will be reported as zero. As soon as the automounter mounts the file system, the sizes will be reported correctly. OPTIONS The following options are supported for both /usr/bin/df and /usr/xpg4/bin/df: -a Report on all file systems 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 to operate. The -F option is intended for use with unmounted file systems. 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 can not be used with the -o option. This option overrides the -b, -e, -k, -n, -P, and -t options. -h Like -k, except that sizes are in a human readable format. 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. All sizes are scaled to a human readable format, for example, 14K, 234M, 2.7G, or 3.0T. Scaling is done by repetitively dividing by 1024.

This option overrides the -b, -e, -g, -k, -n, -t, and -V options. This option only works on mounted filesystems and can not be used together with -o option. -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 overrides the -b, -e, -n, and -t options. -l Report on local file systems only. This option is used only for mounted file systems. It can not be used with the -o option.

SunOS 5.9 Last change: 19 Nov 2001 1 System Administration Commands df ( 1M )

-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 can not 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. -t Print full listings with totals. This option overrides the -b, -e, and -n options. -V the complete set of file system specific command lines, but do not execute them. The com- mand 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. /usr/xpg4/bin/df The following option is supported for /usr/xpg4/bin/df only: -P Same as -k except in 512-byte units. OPERANDS df interprets operands according to the following precedence: block_device, directory, file. The following operands are supported: block_device represents a block special device (for example, /dev/dsk/c1d0s7); the corresponding file system need not be mounted. directory represents a valid directory name. df reports on the file system that contains directory. file represents a valid file name. df reports on the file system that contains file. resource represents an NFS resource name. USAGE See largefile(5) for the description of the behavior of df when encountering files greater than or equal to 2 Gbyte ( 2 31 bytes). EXAMPLES Example 1: Writing Portable Information About the /usr System The following example writes portable information about the /usr file system: example% /usr/xpg4/bin/df -P /usr Example 2: Writing Portable Information About the /usr Assuming that /usr/src is part of the /usr file system, the following example writes portable information : example% /usr/xpg4/bin/df -P /usr/src Example 3: Using df to Display Usage The following example displays inode usage on all ufs file systems: example% /usr/bin/df -F ufs -o i ENVIRONMENT VARIABLES SYSV3 This variable is used to override the default behavior of df and provide compatibility with INTERACTIVE System and SCO UNIX installation scripts. As the SYSV3 variable is provided for compatibility purposes only, it should not be used in new scripts.

SunOS 5.9 Last change: 19 Nov 2001 2 System Administration Commands df ( 1M )

When set, any header which normally displays "files" will now display "nodes". See environ(5) for descriptions of the following environment variables that affect the execution of df: LC_CTYPE, LC_MESSAGES, and NLSPATH. 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 . Default values can be set for the following flags in /etc/default/fs. For example: LOCAL=ufs, where LOCAL is 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 ATTRIBUTES See attributes(5) for descriptions of the following attributes: /usr/bin/df______ ATTRIBUTE TYPE  ATTRIBUTE VALUE     ______Availability  SUNWcsu 

/usr/xpg4/bin/df______ ATTRIBUTE TYPE  ATTRIBUTE VALUE     ______Availability  SUNWxcu4 

SEE ALSO find(1), df_ufs(1M), mount(1M), statvfs(2), default_fs(4), mnttab(4), vfstab(4), attributes(5), environ(5), largefile(5), XPG4(5) NOTES If UFS logging is enabled on a file system, the disk space used for the log is reflected in the df report. The log is allocated from free blocks on the file system, and it is sized approximately 1 Mbyte per 1 Gbyte of file system, up to a maximum of 64 Mbytes.

SunOS 5.9 Last change: 19 Nov 2001 3