# CLI

# Favourite CLI tools

##### Ncdu

Ncdu is a disk usage analyzer with an ncurses interface.

[https://dev.yorhel.nl/ncdu](https://dev.yorhel.nl/ncdu)

##### Dust

du + rust = dust. Like du but more intuitive.

[https://github.com/bootandy/dust](https://github.com/bootandy/dust)

##### Eza

**eza** is a modern, maintained replacement for the venerable file-listing command-line program `ls`

[https://eza.rocks/](https://eza.rocks/)

##### ShellCheck

finds bugs in your shell scripts. Static code analyzer.

[https://www.shellcheck.net/](https://www.shellcheck.net/)

##### shfmt

Shell script formatting

[https://github.com/mvdan/sh#shfmt](https://github.com/mvdan/sh#shfmt)

##### yt-dlp

[https://github.com/yt-dlp/yt-dlp#usage-and-options](https://github.com/yt-dlp/yt-dlp#usage-and-options)

##### fzf

fzf is a general-purpose command-line fuzzy finder.

[https://github.com/junegunn/fzf](https://github.com/junegunn/fzf)

##### ImageMagick

Free software for editing and manipulating digital images.

[Command-line options](https://imagemagick.org/script/command-line-processing.php "Command-line processing page")

**Example: converting all .png files to .jpg format in a directory.** `magick mogrify -format jpg -path /some/output_dir/ -sampling-factor 4:2:0 -quality 100 -interlace plane -strip *.png`

**Notes**

- If the `-path` option is used with `mogrify`, the original (input) files won't be overwritten. New output files will be written to the path.
- `-interlace` option: use either 'Line' or 'Plane' to create an interlaced PNG or progressive JPEG.   
    Reduces JPEG file sizes by a small margin.
- `quality` level significantly affects file size for higher resolutions. For JPEG, try a value of 85 or lower for images with high image resolutions in order to achieve small(er) file sizes.