.\" .\" di.1 .\" .\" Copyright 1994-2018 Brad Lanam Walnut Creek CA USA .\" .\" brad.lanam.di_at_gmail.com .\" .TH di 1 "17 Jan 2013" .SH Name di \- disk information .SH Synopsis .\" di [-AacghHklLmnPqRtZ] [-B block-size] [-d display-size] [-f format] .\" [-I include-fstyp-list] [-s sort-type] [-w block-width] .\" [-W inode-width] [-x exclude-fstyp-list] [-X debug-level] .\" [-z zone-name] [file [...]] .B di [\fB\-AacghHklLmnPqRtZ\fP] [\fB\-B\fP \fIblock\-size\fP] [\fB\-d\fP \fIdisplay\-size\fP] [\fB\-f\fP \fIformat\fP] [\fB\-I\fP \fIinclude\-fstyp\-list\fP] [\fB\-s\fP \fIsort\-type\fP] [\fB\-w\fP \fIblock\-width\fP] [\fB\-W\fP \fIinode\-width\fP] [\fB\-x\fP \fIexclude\-fstyp\-list\fP] [\fB\-X\fP \fIdebug-level\fP] [\fB\-z\fP \fIzone\-name\fP] [\fIfile\fP [...]] .PP .B mi .SH Description \fIdi\fP Displays usage information on mounted filesystems. Block values are reported in a human readable format. If the user or group has a disk quota, the values reported are adjusted according the quotas that apply to the user. .PP If \fIfile\fP is specified, the usage information for the partition on which \fIfile\fP is located is printed. .PP Unless the \-a flag is specified, the following mounted filesystems will not normally be displayed: filesystems with total space <= 0; loopback filesystems that are duplicates of other normally mounted filesystems (filesystem type of 'lofs' , 'none', or 'nullfs'); loopback filesystems that are part of a zone (Solaris). .PP Filesystems that the user does not have permissions to access will not be displayed at all. .PP \fImi\fP Displays the mounted filesystem information. .PP Several options may be specified to control the output of \fIdi\fP and \fImi\fP: .TP .B \-A Print all fields (used for debugging). Mount points and special device names are printed at full width. .TP .B \-a (compatibility: \fB\-\-all\fP) .br Prints all mounted devices (normally, those with 0 total space are not printed \- e.g. \fB/dev/proc\fP, \fB/dev/fd\fP). .TP .B \-B .I block\-size (compatibility: \fB\-\-block\-size\fP, \fB\-b\fP) .br Change the base block size from 1024 (default) to the size specified. \fIblock\-size\fP may be one of: k\ \-\ 1024 bytes, si\ \-\ 1000 bytes, or a specific size. .TP .B \-c (alias: \fB\-\-csv\-output\fP) .br Comma separated values are output. The titles are output as the format string specifiers. Totals are turned off. See also the \-n flag. .TP .B \-C (alias: \fB\-\-csv\-tabs\fP) .br Values are output with tab separators. See also the \-c option. .TP .B \-d .I display\-size (alias: \fB\-\-display\-size\fP) .br Display the usage in units specified by \fIdisplay\-size\fP. Note that if the base block size is SI units of 1000 bytes, the display size is calculated using those units. \fIdisplay\-size\fP may be one of: 512\ \-\ POSIX, k\ \-\ kilobytes, m\ \-\ megabytes, g\ \-\ gigabytes, t\ \-\ terabytes, p\ \-\ petabytes, e\ \-\ exabytes, z\ \-\ zettabytes, y\ \-\ yottabytes, h\ \-\ Scaled alternative 1, H\ \-\ Scaled alternative 2, or a specific value to use as the block size. .IP Block display sizes greater than 1024 bytes are displayed with a precision of one decimal place after the radix. .IP The Scaled alternatives scale the sizes displayed and appends a suffix (e.g. 48.0k, 3.4M). .IP With scaled alternative 1, sizes within a line may scale to different units. .IP Scaled alternative 2 scales all the sizes in each individual line to the same unit size (the largest needed). .TP .B \-f .I format Use the specified format string \fIformat\fP. See the \fBFormat Strings\fP section. .TP .B \-g (alias for: \fB\-dg\fP) .br Display sizes in gigabytes. .TP .B \-h (alias for: \fB\-dh\fP) .br Display partition sizes in scaled alternative 1 format. .TP .B \-\-help .br Display some basic usage information. .TP .B \-H (alias for: \fB\-dH\fP; compatibility: \fB\-\-human\-readable\fP) .br Display partition sizes in scaled alternative 2 format. .TP .B \-I .I include\-fstype\-list (compatibility: \fB\-F\fP, \fB\-\-type\fP) .br Include \fIonly\fP the file system types listed in \fIinclude\-fstyp\-list\fP. The list is a comma separated list of file system types. Multiple \-I options may be specified. If the 'fuse' filesystem type is specified, all fuse* filesystems will be included. .br e.g. \-I nfs,tmpfs or \-I nfs \-I tmpfs. .TP .B \-\-inodes Ignored. Use the \-f option. .TP .B \-k (alias for: \fB\-dk\fP) .br Display sizes in Kbytes. .TP .B \-l (compatibility: \fB\-\-local\fP) .br Display only local file systems. .TP .B \-L Turn off check for duplicate filesystems (loopback (lofs/none) mounts). .TP .B \-m (alias for: \fB\-dm\fP) .br Display sizes in megabytes. .TP .B \-n Do not print a header line above the list of file systems. Useful when parsing the output of \fIdi\fP. .TP .B \-\-no\-sync Ignored. .TP .B \-P (compatibility: \fB\-\-portability\fP) .br Output format is POSIX standard. 512 byte block size is the default. The \-k option may be used. .TP .B \-\-print\-type Ignored. Use the \-f option. .TP .B \-q Disable quota checks. .TP .B \-R (also: \-\-dont\-resolve\-symlinks) .br Do not resolve symlinks (for mount points that have a trailing UUID). .TP .B \-s .I sort\-type .br Use \fIsort\-type\fP to sort the output. The output of \fIdi\fP is normally sorted by mount point. The following sort flags may be used to change the sort order: \fBm\fP \- by mount point (default); \fBn\fP \- leave unsorted (as it appears in the mount table); \fBs\fP \- by special device name; \fBT\fP \- by total space; \fBf\fP \- by free space; \fBa\fP \- by available space; \fBt\fP \- by filesystem type; \fBr\fP \- reverse the sort order; This will apply to all sort flags following this sort flag. .IP These sort options may be combined in any order. e.g.: .RS di \-stsrm # by type, special, reversed mount; .br di \-strsrm # by type, reversed special, mount. .RE .TP .B \-\-si An alias for \fB-dH -Bsi\fP. .TP .B \-\-sync Ignored. .TP .B \-t (compatibility: \fB\-\-total\fP) .br Print a totals line below the list of file systems. Pooled filesystems (zfs, advfs) have only the main pool added to the total. It is up to the user to exclude (using the \-x option) read\-only filesystems (cdfs, iso9660), swap-based (memfs, mfs, tmpfs) filesystems and user (fuse*) filesystems. Excluding the 'fuse' filesystem will exclude all fuse* filesystems. .TP .B \-w .I block\-width .br Set the print width for block values. The default is eight. .TP .B \-v Ignored. .TP .B \-\-version .br Display di's version and default format string. .TP .B \-W .I inode\-width .br Set the print width for inode values. Default is seven. .TP .B \-x .I exclude\-fstype\-list (compatibility: \fB\-\-exclude\-type\fP) .br Exclude the file system types listed in \fIexclude\-fstyp\-list\fP. The list is a comma separated list of file system types. Multiple \-x options may be specified. If the 'fuse' filesystem type is excluded, all fuse* filesystems will be excluded. e.g. \-x nfs,tmpfs or \-x nfs \-x tmpfs. .TP .B \-X .I level .br Set the program's debugging level to \fIdebug-level\fP. .TP .B \-z .I zone-name .br Display the filesystems for the specified zone. The zone must be visible to the user. .TP .B \-Z (alias for: \fB\-z all\fP) .br Display the filesystems for all visible zones. .SH Format Strings The output of \fIdi\fP may be specified via a format string. This string may be given either via the \fB-f\fP command line option or as part of the \fBDI_ARGS\fP environment variable. The format string may specify the following columns: .RS .5 .TP .B m Print the name of the mount point. .TP .B M Print the name of the mount point, at full length. The mount point is formatted to the maximum width necessary for the longest mount point name. .TP .B s Print the file system name (special device or remote mount point). .TP .B S Print the file system name (special device or remote mount point), at full length. The file system name is formatted to the maximum width necessary for the longest file system name. .TP .B t Print the file system type. .TP .B T Print the file system type at full length. The file system type is formatted to the maximum width necessary for the longest file system type. .TP .B Total Available .TP .B b Print the total number of megabytes on the file system. .TP .B B Print the total number of megabytes on the file system available for use by normal users. .TP .B In Use .TP .B u Print the number of megabytes in use on the file system (actual number of megabytes used = total \- free). .TP .B c Print the number of megabytes not available for use by normal users (total \- available). .TP .B Free .TP .B f Print the number of free (unused) megabytes on the file system. .TP .B v Print the number of megabytes available for use by normal users. .TP .B Percentage Used .TP .B p Print the percentage of megabytes not available for use by normal users (number of megabytes not available for use / total disk space). .TP .B 1 Print the percentage of total megabytes in use (actual number of megabytes used / total disk space). .TP .B 2 Print the percentage of megabytes in use, BSD-style. Represents the percentage of user-available space in use. Note that values over 100% are possible (actual number of megabytes used / disk space available to non-root users). .TP .B Percentage Free .TP .B a Print the percentage of megabytes available for use by normal users (number of megabytes available for use / total disk space). .TP .B 3 Print the percentage of total megabytes free (actual number of megabytes free / total disk space). .TP .B Inodes .TP .B i Print the total number of file slots (inodes) that can be created on the file system. .TP .B U Print the number of file slots in use. .TP .B F Print the number of file slots available. .TP .B P Print the percentage of file slots in use. .TP .B Mount Information .TP .B I Print the time the filesystem was mounted. This column is not supported on all systems. .TP .B O Print the filesystem mount options. .RE .PP The default format string for \fIdi\fP is \fBsmbuvpT\fP. .PP The default format string for \fImi\fP is \fBMSTIO\fP. .PP The format string may also contain any other character not listed above. The character will be printed as is. e.g. di \-f 'mbuvp|iUFP' will print the character '|' between the disk usage and the file slot usage. The command sequence: .RS .br di \-f 'mbuvp .br miUFP' .br .RE will print two lines of data for each filesystem. .SH Examples Various \fIdf\fP equivalent format strings for System V release 4 are: .RS \fI/usr/bin/df \-v\fP di \-P \-f msbuf1 .br \fI/usr/bin/df \-k\fP di \-dk \-f sbcvpm .br \fI/usr/ucb/df\fP di \-dk \-f sbuv2m .RE GNU df: .RS \fIdf\fP di \-dk \-f SbuvpM \-w 10 .br \fIdf \-T\fP di \-dk \-f STbuvpM \-w 10 .RE AIX df: .RS \fIdf\fP di \-d 512 \-f Sbf1UPM \-w 10 .br \fIdf \-I\fP di -d 512 \-f Sbuf1M .br \fIdf \-I \-M\fP di \-d 512 \-f SMbuf1 \-w 10 .RE HP-UX bdf: .RS \fIbdf\fP di \-d k \-f Sbuv2M .br \fIbdf \-i\fP di \-d k \-f Sbuv2UFPM .RE .PP If you like your numbers to add up/calculate the percentage correctly, try one of the following format strings: .PP .RS di \-f SMbuf1T .br di \-f SMbcvpT .br di \-f SMBuv2T .RE .SH Environment Variables The DI_ARGS environment variable may be used to specify command line arguments. e.g. If you always want gigabytes displayed, set DI_ARGS equal to "\-dg". Any command line arguments specified will override the DI_ARGS environment variable. .PP The DI_LOCALE_DIR environment variable may be used to specify the location of the di program's locale message files. .PP The GNU df POSIXLY_CORRECT, and DF_BLOCK_SIZE and the BSD BLOCKSIZE environment variables are honored. .SH Note For filesystems that do not report available space (e.g. System V release 3), the number of available space is set to the free space. .SH WARNING Do not replace your system's \fIdf\fP command with this program. You will in all likelihood break your installation procedures. .SH See Also df(1), fstab(5), getmnt(2), getmntinfo(2), mnttab(4), mount(1M) statfs(2), statvfs(2) .SH Bugs Send bug reports to: brad.lanam.di_at_gmail.com .PP Known Issues: .PP di will probably not process a zettabyte or yottabyte sized filesystem properly due to overflow of a long long. .SH Website https://gentoo.com/di/ .SH Author This program is Copyright 1994-2011 by Brad Lanam. .PP Brad Lanam, Walnut Creek, CA (brad.lanam.di_at_gmail.com)