sharkdp/diskus

Provide path in output

Open

#41 geöffnet am 17. Nov. 2020

Auf GitHub ansehen
 (1 Kommentar) (1 Reaktion) (0 zugewiesene Personen)Rust (43 Forks)github user discovery
good first issuehelp wanted

Repository-Metriken

Stars
 (1.216 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Great tool!

Would love to see the path in the output a la:

# diskus /tmp
57.87 MB (57,872,384 bytes) /tmp

Putting diskus in place greatly reduced the amount of time our previous du -sh script took, but I need the path name in the output. So I'm doing this for now, seems though that we lose human readable sizes when manipulating the stdout:

for i in ` find /share/users -mindepth 1 -maxdepth 1 | grep -v "^\.*$"`; do diskus -j 3 $i | awk -v dir=$i '{print $NF "\t\t\t" dir}' & done >> /tmp/diskus-$DATE.log

Output:

20966879414272    /share/users/mholmes
16338228916224    /share/users/sholmes
12737846097408    /share/users/jwatson

DANGER for anyone that finds this at random: The above launches a diskus process for everything found 1 layer in, if you have over 100 dirs and say only 96 cores, this will oversubscribe and you'll see a loadavg over 300.

Contributor Guide