Terminal Fun: Basic Utils Part 2

This is the second post of a series where I want to give some tips and tricks for the Terminal/CLI.
In the first post, I showed a few very handy tools like bat, exa, multitail, diff-so-fancy, delta, prettyping and htop/gtop/vtop.
This post is going to be a little longer so buckle-up, put your helmet on, grab a … frying pan and have fun.

What You Already Have

I think I should have started the previous post with these, there are pretty good guides about basic Unix tools, let me show you a couple I ran into recently: Unix ToolBox is a collection of commands for advanced users, also available in a nice booklet form. Additionally, I like these tweets about the basics:

Search Tools

fd

fd is a simple and convenient alternative to find with some opinionated defaults, check out its readme.

fd-demo

ack

ack is a code-searching tool, similar to grep but optimized for programmers searching large trees of source code. It is highly portable and runs on any platform that runs Perl. Why should you use it? Check out the official site and the readme.

broot

broot is a simple navigator for your files/directories with search capabilities, check out the readme for more examples.

broot-demo

peco

peco is a simple interactive filtering tool, check out its readme.

peco-demo

If you were missing FZF from this list, there will be a separate post for it. :)

Files

You might be familiar with mc (Midnight Commander) but there is more.

nnn

nnn is a terminal file manager; it’s small, simple and offers great performance, check out the features in the readme

nnn-demo

ranger

ranger is a terminal file manager with vi key bindings. It has a nice curses interface with a view on the directory hierarchy and it also supports multi-pane view mode, check out the readme.

ranger-demo

vimv

vimv is a terminal-based file rename utility that lets you easily mass-rename files using Vim, here’s the readme

vimv-demo

Ncdu

Ncdu stands for NCurses Disk Usage, it is a disk usage analyzer with an ncurses interface. It is designed to find space hogs. Check out the official Ncdu site and also the screenshots.

Pro Tip: You can set-up coloring and exclusion patterns, check out the manual.
alias ncdu='ncdu --color dark -rr -x --exclude .git --exclude node_modules'

ncdu-demo

Duc

You might also want to check Duc. It is a collection of tools for indexing, inspecting and visualizing disk usage. Duc maintains a database of accumulated sizes of directories of the file system, and allows you to query this database with some tools, or create fancy graphs showing you where your bytes are.

neovim

neovim is Vim-based text editor which that seeks to aggressively refactor Vim source code to make it better and make it easier to maintain. Check out the project page.

If you want to use nvim when you type vi or vim:

alias vim='nvim'
alias vi='nvim'

If you want to open the current directory in your favorite editor:

alias a='atom .'
alias c='code .'
alias v='vi .'

If you want to use a GUI instead of a terminal editor:

export EDITOR='code --wait'

JSON

You might have already known jq but I think it’s worth to check fx too.

fx-demo

Posts in this series

Thanks to Peter, who let me know about some of these tools.