Du (Unix)

du
Original author(s)Dennis Ritchie
(AT&T Bell Laboratories)
Developer(s)Various open-source and commercial developers
Initial release3 November 1971 (1971-11-03)
Written inPlan 9, FreeDOS: C
Operating systemUnix, Unix-like, Plan 9, Inferno, FreeDOS
PlatformCross-platform
TypeCommand
Licensecoreutils: GPLv3+
Plan 9: MIT License
FreeDOS: GPLv2

du, short for disk usage, is a shell command for reporting file system storage use – space used for a file or a directory tree.

The Single UNIX Specification (SUS) specifies that by default, du reports the space allocated to each file contained in the working directory. For a link file, the size of the link file itself is reported, not what it links to. The size of the content of directories is reported.

As du reports allocation space and not absolute file space, the amount of space on a file system shown by du may vary from that shown by df if files have been deleted but their blocks not yet freed. Also, the minfree setting that allocates data blocks for the file system and the super user processes creates a discrepancy between total blocks and the sum of used and available blocks. The minfree setting is usually set to about 5% of the total file system size. For more info see core utils faq.


© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search