Open Byron opened 3 years ago
Beware of 2 things:
pdu
takes 2 arguments or more, it becomes (total)
.
--min-ratio
(default: 0.01) is greater than 0, files and directories whose relative size is under the required ratio won't appear.
--min-ratio=0
.Thank you. Especially the first point might have been a foot gun.
The latter is preferred to not increase build times of
dua
.
Both options have pros and cons.
Using the parallel_disk_usage
library crate would eliminate runtime dependency on the pdu
command, provide competitive performance (JSON serialization/deserialization has runtime cost), and allowing you to reuse existing JSON struct instead of reinventing the wheel. The only cost I can think of right now is greater compile time and binary size.
Using the pdu
command is the UNIX way. The pros and cons of this option is the opposite of the library option.
Another note is that the structure of the JSON is not final. You may subscribe to https://github.com/KSXGitHub/parallel-disk-usage/issues/27 and https://github.com/KSXGitHub/parallel-disk-usage/issues/28 for potential changes.
Another note is that the structure of the JSON is not final. You may subscribe to KSXGitHub/parallel-disk-usage#27 and KSXGitHub/parallel-disk-usage#28 for potential changes.
Thank you, that will definitely help.
That way one can seriously cut down the time it takes to find what is even worth deleting. As much fun as browsing the file tree might be it's faster to have
pdu
prepare the tree for you.Ways of invoking pdu
pdu
as library with corresponding feature flagspdu
as binary and output jsonThe latter is preferred to not increase build times of
dua
.