Where I can find the source code for du
and other Linux utilities?
The du command is a standard Linux/Unix command that allows a user to gain disk usage information quickly. It is best applied to specific directories and allows many variations for customizing the output to meet your needs. As with most commands, the user can take advantage of many options or flags.
The GNU Core Utilities or coreutils is a package of GNU software containing implementations for many of the basic tools, such as cat, ls, and rm, which are used on Unix-like operating systems.
du stands for “Disk Usage”. It is a standard command used to estimate space usage (meaning, in the terminal we can find the exact size each directory and file takes up). There are multiple ways we can generate various types of output in Terminal using the 'du' command with various options.
In most cases these days, the default block size is 1024 bytes, so you are effectively looking at all the sizes reported in kilobytes, but to make sure it's always the case I advise you to use -k parameter which overrides you Unix flavour default block size and sets it to 1024 bytes: root@ubuntu# du -k 4 ./.
It is with the GNU CoreUtils package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With