table of contents
di(1) | General Commands Manual | di(1) |
Name¶
di - disk informationSynopsis¶
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 [...]] miDescription¶
di 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. If file is specified, the usage information for the partition on which file is located is printed. 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). Filesystems that the user does not have permissions to access will not be displayed at all. mi Displays the mounted filesystem information. Several options may be specified to control the output of di and mi:- -A
- Print all fields (used for debugging). Mount points and special device names are printed at full width.
- -a
- (compatibility: --all)
- -B
- block-size (compatibility: --block-size, -b)
- -c
- (alias: --csv-output)
- -d
- display-size (alias: --display-size)
- Block display sizes greater than 1024 bytes are displayed with a precision of one decimal place after the radix.
- The Scaled alternatives scale the sizes displayed and appends a suffix (e.g. 48.0k, 3.4M).
- With scaled alternative 1, sizes within a line may scale to different units.
- Scaled alternative 2 scales all the sizes in each individual line to the same unit size (the largest needed).
- -f
- format Use the specified format string format. See the Format Strings section.
- -g
- (alias for: -dg)
- -h
- (alias for: -dh)
- --help
-
- -H
- (alias for: -dH; compatibility: --human-readable)
- -I
- include-fstype-list (compatibility: -F, --type)
- --inodes
- Ignored. Use the -f option.
- -k
- (alias for: -dk)
- -l
- (compatibility: --local)
- -L
- Turn off check for duplicate filesystems (loopback (lofs/none) mounts).
- -m
- (alias for: -dm)
- -n
- Do not print a header line above the list of file systems. Useful when parsing the output of di.
- --no-sync
- Ignored.
- -P
- (compatibility: --portability)
- --print-type
- Ignored. Use the -f option.
- -q
- Disable quota checks.
- -R
- (also: --dont-resolve-symlinks)
- -s
- sort-type
- These sort options may be combined in any order. e.g.: di -stsrm - by type, special, reversed mount; di -strsrm - by type, reversed special, mount.
- --si
- An alias for -dH -Bsi.
- --sync
- Ignored.
- -t
- (compatibility: --total)
- -w
- block-width
- -v
- Ignored.
- --version
-
- -W
- inode-width
- -x
- exclude-fstype-list (compatibility: --exclude-type)
- -X
- level
- -z
- zone-name
- -Z
- (alias for: -z all)
Format Strings¶
The output of di may be specified via a format string. This string may be given either via the -f command line option or as part of the DI_ARGS environment variable. The format string may specify the following columns:- m
- Print the name of the mount point.
- 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.
- s
- Print the file system name (special device or remote mount point).
- 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.
- t
- Print the file system type.
- 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.
- Total Available
- b
- Print the total number of megabytes on the file system.
- B
- Print the total number of megabytes on the file system available for use by normal users.
- In Use
- u
- Print the number of megabytes in use on the file system (actual number of megabytes used = total - free).
- c
- Print the number of megabytes not available for use by normal users (total - available).
- Free
- f
- Print the number of free (unused) megabytes on the file system.
- v
- Print the number of megabytes available for use by normal users.
- Percentage Used
- p
- Print the percentage of megabytes not available for use by normal users (number of megabytes not available for use / total disk space).
- 1
- Print the percentage of total megabytes in use (actual number of megabytes used / total disk space).
- 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).
- Percentage Free
- a
- Print the percentage of megabytes available for use by normal users (number of megabytes available for use / total disk space).
- 3
- Print the percentage of total megabytes free (actual number of megabytes free / total disk space).
- Inodes
- i
- Print the total number of file slots (inodes) that can be created on the file system.
- U
- Print the number of file slots in use.
- F
- Print the number of file slots available.
- P
- Print the percentage of file slots in use.
- Mount Information
- I
- Print the time the filesystem was mounted. This column is not supported on all systems.
- O
- Print the filesystem mount options.
Examples¶
Various df equivalent format strings for System V release 4 are:/usr/bin/df -v di -P -f msbuf1
/usr/bin/df -k di -dk -f sbcvpm
/usr/ucb/df di -dk -f sbuv2m
GNU df:
df di -dk -f SbuvpM -w 10
df -T di -dk -f STbuvpM -w 10
AIX df:
df di -d 512 -f Sbf1UPM -w 10
df -I di -d 512 -f Sbuf1M
df -I -M di -d 512 -f SMbuf1 -w 10
HP-UX bdf:
bdf di -d k -f Sbuv2M
bdf -i di -d k -f Sbuv2UFPM
If you like your numbers to add up/calculate the percentage correctly, try one
of the following format strings:
di -f SMbuf1T
di -f SMbcvpT
di -f SMBuv2T
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. The DI_LOCALE_DIR environment variable may be used to specify the location of the di program's locale message files. The GNU df POSIXLY_CORRECT, and DF_BLOCK_SIZE and the BSD BLOCKSIZE environment variables are honored.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.WARNING¶
Do not replace your system's df command with this program. You will in all likelihood break your installation procedures.See Also¶
df(1), fstab(5), getmnt(2), getmntinfo(2), mnttab(4), mount(1M) statfs(2), statvfs(2)Bugs¶
Send bug reports to: brad.lanam.di_at_gmail.comWebsite¶
http://www.gentoo.com/di/Author¶
This program is Copyright 1994-2011 by Brad Lanam. Brad Lanam, Walnut Creek, CA (brad.lanam.di_at_gmail.com)17 Jan 2013 |