Also known as disk free, Df (UNIX)
standard Unix computer program
The df utility shall write the amount of available space [XSI) ] ![[Option Start]]( and file slots ![[Option End]]( for file systems on which the invoking user has appropriate read access. File systems shall be specified by the file operands; when none are specified, information shall be written for all file systems. The format of the default output from df is unspecified, but all space figures are reported in 512-byte units, unless the -k option is specified. This output shall contain at least the file system names, amount of available space on each of these file systems, [XSI) ] ![[Option Start]]( and, if no options other than -t are specified, the number of free file slots, or inode s, available; when -t is specified, the output shall contain the total allocated space as well. ![[Option End]]( Use 1024-byte units, instead of the default 512-byte units, when writing space figures. [XSI) ] ![[Option Start]]( Include total allocated-space figures in the output. ![[Option End]]( A pathname of a file within the hierarchy of the desired file system. If a file other than a FIFO, a regular file, a directory, [XSI) ] ![[Option Start]]( or a special file representing the device containing the file system (for example, /dev/dsk/0s1 ) ![[Option End]]( is specified, the results are unspecified. If the file operand names a file other than a special file containing a file system, df shall write the amount of free space in the file system containing the specified file operand. [XSI) ] ![[Option Start]]( Otherwise, df shall write the amount of free space in that file system. ![[Option End]]( Provide a default value for the internationalization variables that are unset or null. (See XBD Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.) If set to a non-empty string value, override the values of all the other internationalization variables. Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error and informative messages written to standard output. [XSI) ] ![[Option Start]]( Determine the location of message catalogs for the processing of LC MESSAGES. ![[Option End]]( The implementation may adjust the spacing of the header line and the individual data lines so that the information is presented in orderly columns. The remaining output with -P shall consist of one line of information for each specified file system. These lines shall be formatted as follows: The total size of the file system in 512-byte units. The exact meaning of this figure is implementation-defined, but should include , , plus any space reserved by the system not normally available to a user. The total amount of space allocated to existing files in the file system, in 512-byte units. The total amount of space available within the file system for the creation of new files by unprivileged users, in 512-byte units. When this figure is less than or equal to zero, it shall not be possible to create any new files on the file system without first deleting others, unless the process has appropriate privileges. The figure written may be less than zero. The percentage of the normally available space that is currently allocated to all files on the file system. This shall be calculated using the fraction: On large file systems, the calculation specified for percentage used can create huge rounding errors. 1. The following example writes portable information about the /usr file system: 2. Assuming that /usr/src is part of the /usr file system, the following produces the same output as the previous example: The use of 512-byte units is historical practice and maintains compatibility with ls and other utilities in this volume of POSIX.1-2017. This does not mandate that the file system itself be based on 512-byte blocks. The -k option was added as a compromise measure. It was agreed by the standard developers that 512 bytes w
Excerpt from a page describing this subject · 12,414 chars · not written by Vinony
via Wikidata · CC0
via Wikidata sitelinks · CC0
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).