gdu
gdu copied to clipboard
improvement of -n output
When doing a scan using -n
you are presented with the following until the scan is completed.
The directory structure looks like:
var
- data
-- batch1
--- Dir1
--- Dir2
--- Dir3
--- Dir4
-- batch2
--- Dir1
--- Dir2
--- Dir3
--- Dir4
-- batch3
--- Dir1
--- Dir2
--- Dir3
--- Dir4
When I am inside data
and running the scan will it not be possible for gdu to start displaying the completed sizes for the directories as they are completed? I'd then have a better understanding of how much has been processed.
⠼ Scanning... Total items: 1,575,919 size: 41.4 KiB
Found:
1.5 GiB /batch1
...
or
Found:
1.5 GiB /batch1
...
⠼ Scanning... Total items: 1,575,919 size: 41.4 KiB
Interesting idea. I think some more verbose output could be indeed beneficial.
The problem is that we don't process the directories sequentially, but rather in random order and random depth. Which brings the speed of gdu. So it won't be easy to print some more verbose information about the subdirectories.
Could it still print the top directory as it completes? Unless what you are saying implies that all the directories will complete roughly at the same time?
We can try. In some cases it will complete at the same time. In some cases probably not.