If you have used any Unix-like operating systems like GNU/Linux or terminal in the macOS, you will be familiar with
cd, ls, grep, find and other CLI commands. These tools were written using the C programming language in the 90s and were developed for, or are maintained by, the Free Software Foundation as part of the GNU Project. Since then, there have been no major changes to these tools/packages. So the open-source community decided to re-write modern replacements/alternatives for these commands using modern programming languages.
Modern programming languages like Rust and Go are fast, and efficient and are designed to make use of multi-core CPU architectures. These languages are considered as the modern C-like programming languages. The following tools/packages are written using Rust or Go and are modern alternatives for the default command-line tools:
bat- Is a
catcommand clone with syntax highlighting and Git integration. It is written in Rust.
- Supports syntax highlighting for a large number of programming and markup languages.
- Communicates with
gitto show modifications with respect to the index.
- By default,
batpipes its own output to a pager (e.g.
less) if the output is too large for one screen.
- You can use the
--show-alloption to show and highlight non-printable characters.
Project Source: https://github.com/sharkdp/bat
fd - Is a replacement for the old
find command, which is a powerful tool for finding files, and directories and has a lot of options and flags. It is written in Rust.
- Intuitive syntax.
- Regular expression (default) and glob-based patterns.
- Very fast due to parallelized directory traversal.
- Uses colors to highlight different file types.
- Ignores patterns from your
.gitignore, by default.
- Ignores hidden directories and files, by default.
- The command name is 50% shorter than
Project Source: https://github.com/sharkdp/fd
exa - Is a modern replacement for
ls command, which is used to list all the files and directories. It is written using Rust.
- It uses colors to distinguish file types and metadata.
- It knows about symlinks, extended attributes, and Git.
- It can display icons.
Project Source: https://github.com/ogham/exa
delta - A syntax-highlighting pager for git, diff, and grep output. It is written in Rust.
- Language syntax highlighting with the same syntax-highlighting themes as
- Word-level diff highlighting.
- Side-by-side view with line-wrapping.
- Code can be copied directly from the diff.
- Improved merge conflict display.
Nkeybindings to move between files in large diffs.
Project Source: https://github.com/dandavison/delta
zoxide- Is a Rust implementation to the
cd command, which stands for 'change directory'.
- It remembers which directories you use most frequently.
- It works on all major shells.
fzfis a command-line fuzzy finder, used by
zoxidefor interactive selection.
- Instead of typing the full command, instead, you can use the alias
Project Source: https://github.com/ajeetdsouza/zoxide
ripgrep - Is a replacement for
grep command. It is a file pattern searcher written in Rust.
- By default,
ripgrepwill respect .gitignore rules and automatically skip hidden files/directories and binary files.
- It has first-class support on Windows, macOS, and Linux, with binary downloads available.
- It supports arbitrary input preprocessing filters which could be PDF text extraction.
- It can search specific types of files.
Project Source: https://github.com/BurntSushi/ripgrep
dust - A more intuitive version of
du command which is used to display disk usage statistics. It is written in Rust.
- Gives you an instant overview of which directories are using disk space.
- Dust will print a maximum of one 'Did not have permissions message'.
- The largest subdirectories will be colored.
- Dust will list a slightly-less-than-the-terminal-height number of the biggest subdirectories or files and will smartly recurse down the tree to find the larger ones.
Project Source: https://github.com/bootandy/dust
duf - It is a replacement for
df command which displays free disk space. It is written in Go.
- It is user-friendly with colorful output.
- It can adjust to your terminal's theme & width.
- Sort the results according to your needs.
- Groups & filters devices.
- Can conveniently output JSON.
Project Source: https://github.com/muesli/duf
There are other alternative tools as well but, these are my favorite replacements. Check these projects on GitHub for more detailed explanations, installation, configurations, usage, and more. If you like these kinds of stuff, check out my other posts, tutorials, and tips. If you want to stay updated, then subscribe to my Newsletter.
Checkout My Other Post: