1 unstable release
Uses old Rust 2015
|0.2.0||Nov 1, 2018|
#1730 in Command line utilities
A minimal, fast alternative to
dup is a very simple program that computes the total size of the current directory. It is a
parallelized version of
du -sh. On my 8-core laptop, it is about nine times faster than
a cold disk cache and more than twice as fast on a warm disk cache.
> dup 14.56 GB (14556806983 bytes)
The following benchmarks have been performed with hyperfine on a moderately large folder (15GB, 100k directories, 400k files). Smaller folders are not really of any interest since all programs would finish in a reasonable time that would not interrupt your workflow.
In addition to
dup, we also add tin-summer (
dust in our comparison. Both are also written in Rust and provide
much more features than
dup (check them out!). The optimal number of threads for
-j option) was
Cold disk cache
sudo -v hyperfine --prepare 'sync; echo 3 | sudo tee /proc/sys/vm/drop_caches' \ 'dup' 'sn p -d0 -j8' 'du -sb' 'dust -d0'
drop_caches commands are a way to
clear the filesystem caches between benchmarking runs)
|Command||Mean [s]||Min…Max [s]|
||1.729 ± 0.012||1.717…1.756|
||9.778 ± 0.098||9.587…9.904|
||16.016 ± 0.067||15.923…16.147|
||19.845 ± 0.466||19.428…20.948|
Warm disk cache
On a warm disk cache, the differences are smaller:
hyperfine --warmup 5 'dup' 'sn p -d0 -j8' 'du -sb' 'dust -d0'
|Command||Mean [ms]||Min…Max [ms]|
||465.9 ± 14.7||446.5…487.4|
||596.4 ± 12.2||579.2…615.9|
||1100.3 ± 20.5||1086.9…1153.0|
||3560.1 ± 27.8||3521.7…3612.8|
On Debian-based systems
wget "https://github.com/sharkdp/dup/releases/download/v0.1.0/dup_0.1.0_amd64.deb" sudo dpkg -i dup_0.1.0_amd64.deb
On other distrubutions
Check out the release page for binary builds.