When my computer is running low on storage space, I use a program like TreeSize Free (Martin prefers WizTree) to check what's taking up the most amount of space, and move the content to my external drives. Such applications tend to be heavy on resources, and have a lot of options, some of which you may never use.
GDU is a terminal based disk usage analysis tool that is lightweight and easy to use.
The program is portable, extract it to a folder after the download to get started. Since it does not have an interface, you will need to open a Command Prompt window and run GDU from it.
Let's scan a drive, for this we need to enter GDU <DRIVE NAME>. For example, if we want to scan the C drive, we'll use GDU C:. The program will scan the drive and display the results in just a couple of seconds. GDU has a colorized command window, which makes it easy to distinguish folders from files. There is a monochrome mode that you can activate using GDU -c. E.g. GDU -c C:\.
The bar at the bottom of the screen tells you the total disk usage, and the file count. The command to scan a folder is similar to the one we used above, type GDU <FOLDER PATH>. Replace the folder path with the actual path like GDU C:\Users\Ashwin\Documents\. The program will list all directories in the folder, with their file size. The number at the top of the list indicates the total disk usage of the current folder. You can switch between actual usage (size on disk) and apparent usage size, with the a key.
Use the up and down arrow keys to navigate the list. Hit the Enter key to open the selected folder. This way you can find the disk usage of sub-folders individually. So, in a way GDU is sort of a file manager. To go back to the previous folder, tap the h key.
You may sort the directory by name with the n key, or by size with s. Tap the keys twice to switch between ascending and descending order. Did you notice that I have used lowercase for the key's names? That's because the shortcuts are case-sensitive. e.g. C will sort the items by file count, but c toggles the file count information.
GDU can open text files, to do so, select the document and press v. Use the Escape key to exit the file view mode.
Pressing the d key will delete the selected file or folder, the program warns you about this and asks for your confirmation before deleting the content. I advise paying attention to this option, else you could lose important data. When you're done with GDU, press the q key to exit the program.
You can export the data to a file, like a text document. The command for this is GDU > list.txt C:\. Replace "List" with a file name of your choice, and GDU will save the list of files and folders to a text document in its folder. Type ? to view the help file to view more commands.
GDU is an open source utility written in GO. It supports Windows, and Linux. The program's best feature is its speed, thanks to the fact it doesn't have an interface, switching to folders is an instantaneous process.
Thank you for being a Ghacks reader. The post GDU is a command line tool that helps you find the disk usage of a folder or drive appeared first on gHacks Technology News.
0 Commentaires