Linux alternative cmd written in Rust / Go

Command: du

1. Native ones

du – Summarize disk usage of the set of FILEs, recursively for directories.

Most popular commands:
du -sh /path – show total summary for a defined path

du -h -d 1 /path – show directory sizes with custom depth (-d option)

du -h -d 1 /path | sort -hr – same as previous, but with sort from largest to lowest

du output

df – report file system disk space usage

Output result looks like:

2. Dust – Rust-written du improve.

Show result as a pretty tree with sort (Ascending by default)

Repository: https://github.com/bootandy/dust

dust

Output can be limited by depth and reversed from largest to lowest

dust -r -d 1

dust -r -d1

Also, it has an interesting feature – showing by file count instead of files size

dust -fr

3. Ncdu – N-curses du version

Site: https://dev.yorhel.nl/ncdu

Install on Ubuntu: apt install ncdu

Install on ArchLinux: sudo pacman -S ncdu

It scans the defined directory, show disk usage, and bring the ability to navigate by child directories

ncdu

4. Dutree – yet another du alternative, written with rust

Repository: https://github.com/nachoparker/dutree

Installation: cargo install dutree

dutree

5. Duf – Go-written better df alternative

Repository: https://github.com/muesli/duf

Install on Ubuntu/Debian: apt install duf

Install on ArchLinux: yay -S duf

It is really fast, has a pretty look, and has a killer feature – the ability to output as JSON, that can be useful for monitoring

duf

Photo by Julian Hochgesang on Unsplash