du reports the amount of file space used by the files indicated by the given pathnames. If pathname is a directory, du reports the total amount of file space used by all files in that directory and in each subdirectory in its hierarchy. If you do not specify any pathname, du assumes the current directory. Files with multiple links are only counted once.
du measures file space in 512-byte units. The attempt is made to report actual file space used, if possible. This means on UNIX systems actual file space used for sparse files; on 7/2008R2/8/2012/10/2016 systems actual file space used for compressed files.
generates a report for all files in pathname.
displays file sizes using more human-friendly units. Units used are:
B Bytes KB Kilobytes MB Megabytes TB Terabytes PB Petabytes EB Exabytes
When this option is specified, each file size is displayed using the most appropriate unit and is rounded to two decimal places.
displays file sizes in 1024-byte (1K) units.
displays only num levels of subdirectories.
reports files which cannot be opened and directories which cannot be read; this is the default behavior.
does not display file size totals for subdirectories.
displays the total amount of space used by all pathnames examined.
displays file sizes for only those files contained on the same device as pathname.
MKS Toolkit supports hard links under 7/2008R2/8/2012/10/2016 on NTFS file systems. There is a slight loss of performance for this support. If you do not require hard link support, you should set and export the environment variable TK_NTLINKS_OFF to disable this support.
When this variable is set, the Enhanced UNIX Compatibility Mode is on and the virtual file system is in use.
Because the virtual file system treats all mounted drives as part of the same file system, the command:
traverses and displays information about all mounted drives when the Enhanced UNIX Compatibility Mode is on. To exclude mounted drives, use the command:
du -x /
For details on the Enhanced UNIX Compatibility Mode and the virtual file system, see the EUCM reference page.
Possible exit status values are:
Failure due to any of the following:
POSIX.2. x/OPEN Portability Guide 4.0. All UNIX systems. Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.
du computes file space in units of 512 bytes. The actual disk space used by files and directories may be more, since some systems allocate space in units of some multiple of a sector. On UNIX System V, it is usually two sectors; on UNIX Version 7, it is one sector.
PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.1 Documentation Build 15.