
First off I will run the command with only two switches, -q to suppress the banner and -v to show the size of subdirectories. Let me use the following two command run outputs to demonstrate what I mean by this. The -l switch can be used to determine how many levels deep directory usage is reported on. I use the -q switch to suppress the banner and -v to “Show size (in KB) of all subdirectories” – C:\>du -v -q s:\backups The program works quite happily on mapped drives as shown below. Note that you cannot use -n, -l or -v together, they are considered to be mutually exclusive which makes sense when you consider what the switches do. The Sysinternals documentation provides the following as a reference for the command syntax. This demonstrates the importance of knowing the command syntax – du expects all switches to come before the directory path. Entering the -q switch after the directory will result in nothing being displayed. Note the command syntax expects the switch to come before the directory path. To avoid seeing the Sysinternals Du banner every time the command runs you can use the -q Quiet switch. Path,CurrentFileCount,CurrentFileSize,FileCount,Director圜ount,DirectorySize v Show size (in KB) of all subdirectories. u Count each instance of a hardlinked file. l Specify subdirectory depth of information (default is one level). We can view the available command options by simply running du, the help output will display without the need for /? or -? however if you do add these they will bring up the help as expected. Running du.exe from the command line by default will list the number of files, directories and size for a given target path having iterated recursively through that path.Īs an example, below I execute the command and provide a drive path to examine. What information does it present and how do I use it? Quite often my team is asked to explain why a system is running low or out of disk space and having an effective tool to assist in this process is vital. If you want to know which directories contain the data filling a drive this tool can be most useful – if you’ve used the ‘TreeSize’ program consider Du to be a CLI equivalent. It is basically the equivalent of the du command on those platforms and provides information on the size of a given directory. What is Directory disk usage reporter?ĭirectory disk usage reporter will be very familiar to those who have used Unix/Linux based operating systems. It is the second post in a series covering the Sysinternals suite of tools to help people discover new ones they may not have used before. This post covers the Sysinternals tool Du – Directory disk usage reporter.
