


The “ -c” flag provides a grand total usage disk space at the last line. The “ -m” flag counts the blocks in MB units and “ -h” stands for human-readable format. To get the summary of disk usage of directory tree along with its subtrees in Megabytes ( MB) only. Use the “ -k” (displays size in 1024 bytes units).

Find out the disk usage of a directory tree with its subtree in Kilobyte blocks. ]# du -ah /home/tecmintġ2K /home/tecmint/downloads/uploadprogress-1.0.3.1.tgzĢ4K /home/tecmint/downloads/2ġ2K /home/tecmint/uploadprogress-1.0.3.1.tgzĦ73M /home/tecmint/Ubuntu-12.10/Ħ. The below output is easier to understand as it shows the files in Kilobytes, Megabytes, etc. Using the “ -a” flag along with “ -h” displays disk usage of all files and folders in a human-readable format.

Using the “ -a” flag with the “ du” command displays the disk usage of all the files and directories. To get the summary of a grand total disk usage size of a directory uses the option “ -s” as follows. ]# du -h /home/tecmintĦ74M /home/tecmint How to Find Total Size of a Directory in Linuxģ. This means you can see sizes in Bytes, Kilobytes, Megabytes, Gigabytes, etc. Using the “ -h” option with the “ du” command provides results in “ Human Readable Format“. How to Find the Directory Size in Human Readable FormatĢ. The output of the above command displays the number of disk blocks in the /home/tecmint directory along with its sub-directories. Enter the command as: ]# du /home/tecmint To find out the disk usage summary of a /home/tecmint directory tree and each of its subdirectories. How to Find the Size of a Directory in Linuxġ. Agedu – A Useful Tool for Tracking Down Wasted Disk Space in Linux.12 “df” Command to Check Linux System Disk Space.The information provided in this article is taken from the man pages of du command. This article explains 10 useful “du” commands with their examples, which might help you to find out the sizes of files and directories in Linux. Check Disk Usage of Files and Folders In Linux The du command also displays the files and directory sizes in a recursive manner. The du command has many parameter options that can be used to get the results in many formats. The Linux “ du” ( Disk Usage) is a standard Unix/Linux command, used to check the information of disk usage of files and directories on a machine.
