All Projects → sharkdp → Diskus

sharkdp / Diskus

Licence: other
A minimal, fast alternative to 'du -sh'

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Diskus

Fsq
A tool for querying the file system with a SQL-like language.
Stars: ✭ 60 (-91.1%)
Mutual labels:  cli, command-line, filesystem, tool
Fd
A simple, fast and user-friendly alternative to 'find'
Stars: ✭ 19,851 (+2845.25%)
Mutual labels:  cli, command-line, filesystem, tool
Lucid
A simple mock-application for programs that work with child processes
Stars: ✭ 45 (-93.32%)
Mutual labels:  cli, command-line, tool
Rundeck Cli
CLI tool for Rundeck
Stars: ✭ 98 (-85.46%)
Mutual labels:  cli, command-line, tool
Fselect
Find files with SQL-like queries
Stars: ✭ 3,103 (+360.39%)
Mutual labels:  cli, filesystem, tool
Bat
A cat(1) clone with wings.
Stars: ✭ 30,833 (+4474.63%)
Mutual labels:  cli, command-line, tool
Mprislyrics
Small command-line utility that displays lyrics in sync with the currently playing song in a MPRIS2 capable player.
Stars: ✭ 24 (-96.44%)
Mutual labels:  cli, command-line, tool
Proji
A powerful cross-platform CLI project templating tool.
Stars: ✭ 156 (-76.85%)
Mutual labels:  cli, command-line, tool
Laravel Zero
A PHP framework for console artisans
Stars: ✭ 2,821 (+318.55%)
Mutual labels:  cli, command-line, tool
Onefetch
Git repository summary on your terminal
Stars: ✭ 3,680 (+445.99%)
Mutual labels:  cli, command-line, tool
Teip
Select partial standard input and replace with the result of another command efficiently
Stars: ✭ 280 (-58.46%)
Mutual labels:  cli, command-line, tool
Nnn
n³ The unorthodox terminal file manager
Stars: ✭ 13,138 (+1849.26%)
Mutual labels:  cli, command-line, filesystem
Csview
📠 A high performance csv viewer with cjk/emoji support.
Stars: ✭ 208 (-69.14%)
Mutual labels:  cli, command-line, tool
Pastel
A command-line tool to generate, analyze, convert and manipulate colors
Stars: ✭ 3,742 (+455.19%)
Mutual labels:  cli, command-line, tool
Jtc
JSON processing utility
Stars: ✭ 425 (-36.94%)
Mutual labels:  cli, command-line, tool
Cbt
CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala
Stars: ✭ 489 (-27.45%)
Mutual labels:  cli, command-line
Ferret
Declarative web scraping
Stars: ✭ 4,837 (+617.66%)
Mutual labels:  cli, tool
Xonsh
🐚 Python-powered, cross-platform, Unix-gazing shell
Stars: ✭ 5,327 (+690.36%)
Mutual labels:  cli, command-line
Nve
Run any command on specific Node.js versions
Stars: ✭ 531 (-21.22%)
Mutual labels:  cli, command-line
Quicli
Quickly build cool CLI apps in Rust.
Stars: ✭ 481 (-28.64%)
Mutual labels:  cli, command-line

diskus

Build Status

A minimal, fast alternative to du -sh.

diskus 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 ten times faster than du with a cold disk cache and more than three times faster with a warm disk cache.

> diskus
9.59 GB (9,587,408,896 bytes)

Benchmark

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 du and diskus, we also add tin-summer (sn) and dust in our comparison. Both are also written in Rust and provide much more features than diskus (check them out!). The optimal number of threads for sn (-j option) was determined via hyperfine --parameter-scan.

Cold disk cache

sudo -v
hyperfine --prepare 'sync; echo 3 | sudo tee /proc/sys/vm/drop_caches' \
    'diskus' 'du -sh' 'sn p -d0 -j8' 'dust -d0'

(the sudo/sync/drop_caches commands are a way to clear the filesystem caches between benchmarking runs)

Command Mean [s] Min [s] Max [s] Relative
diskus 1.746 ± 0.017 1.728 1.770 1.00
du -sh 17.776 ± 0.549 17.139 18.413 10.18
sn p -d0 -j8 18.094 ± 0.566 17.482 18.579 10.36
dust -d0 21.357 ± 0.328 20.974 21.759 12.23

Warm disk cache

On a warm disk cache, the differences are smaller:

hyperfine --warmup 5 'diskus' 'du -sh' 'sn p -d0 -j8' 'dust -d0'
Command Mean [ms] Min [ms] Max [ms] Relative
diskus 500.3 ± 17.3 472.9 530.6 1.00
du -sh 1098.3 ± 10.0 1087.8 1122.4 2.20
sn p -d0 -j8 1122.2 ± 18.2 1107.3 1170.1 2.24
dust -d0 3532.1 ± 26.4 3490.0 3563.1 7.06

Installation

On Debian-based systems

You can download the latest Debian package from the release page and install it via dpkg:

wget "https://github.com/sharkdp/diskus/releases/download/v0.6.0/diskus_0.6.0_amd64.deb"
sudo dpkg -i diskus_0.6.0_amd64.deb

On Arch-based systems

pacman -S diskus

Or download diskus-bin from the AUR.

On Void-based systems

xbps-install diskus

On macOS

You can install diskus with Homebrew:

brew install diskus

Or with MacPorts:

sudo port install diskus

On Haiku

pkgman install diskus

On NixOS

nix-env -iA nixos.diskus

Or add it to environment.systemPackages in your configuration.nix.

On other systems

Check out the release page for binary builds.

Via cargo

If you have Rust 1.34 or higher, you can install diskus from source via cargo:

cargo install diskus

Windows caveats

Windows-internal tools such as Powershell, Explorer or dir are not respecting hardlinks or junction points when determining the size of a directory. diskus does the same and counts such entries multiple times (on Unix systems, multiple hardlinks to a single file are counted just once).

License

Licensed under either of

at your option.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].