du | |
---|---|
![]() Example screenshot of du in a terminal | |
Original author(s) | Dennis Ritchie (AT&T Bell Laboratories) |
Developer(s) | Various open-source and commercial developers |
Initial release | 3 November 1971 |
Written in | Plan 9, FreeDOS: C |
Operating system | Unix, Unix-like, Plan 9, Inferno, FreeDOS |
Platform | Cross-platform |
Type | Command |
License | coreutils: 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