The Linux Shell proves invaluable for various tasks, and here’s a single command to swiftly identify directories with substantial disk usage. This command serves as a useful tool for monitoring and optimizing disk space allocation, particularly when dealing with disk space hogs.
Command:
du -h <dir> 2>/dev/null | grep '[0-9\.]\+G'
Simply replace “<dir>” with your target directory (use “/” for the root directory).
Output: