Try These 8 Modern Alternatives to Common Unix Commands

Try These 8 Modern Alternatives to Common Unix Commands

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:

  1. bat - Is a  cat command clone with syntax highlighting and Git integration. It is written in Rust.

Features:

  • Supports syntax highlighting for a large number of programming and markup languages.
  • Communicates with git to show modifications with respect to the index.
  • By default, bat pipes its own output to a pager (e.g. less) if the output is too large for one screen.
  • You can use the -A/--show-all option to show and highlight non-printable characters.

Project Source: https://github.com/sharkdp/bat

2. 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.

Features:

  • 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 find

Project Source: https://github.com/sharkdp/fd

3. exa - Is a modern replacement for ls command, which is used to list all the files and directories. It is written using Rust.

Features:

  • 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

4. delta - A syntax-highlighting pager for git, diff, and grep output. It is written in Rust.

Features:

  • Language syntax highlighting with the same syntax-highlighting themes as bat.
  • Word-level diff highlighting.
  • Side-by-side view with line-wrapping.
  • Code can be copied directly from the diff.
  • Improved merge conflict display.
  • n and N keybindings to move between files in large diffs.

Project Source: https://github.com/dandavison/delta

5. zoxide- Is a Rust implementation to the cd command, which stands for 'change directory'.

Features:

  • It remembers which directories you use most frequently.
  • It works on all major shells.
  • fzf is a command-line fuzzy finder, used by zoxide for interactive selection.
  • Instead of typing the full command, instead, you can use the alias z.

Project Source: https://github.com/ajeetdsouza/zoxide

6. ripgrep - Is a replacement for grep command. It is a file pattern searcher written in Rust.

Features:

  • By default, ripgrep will 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

7. dust - A more intuitive version of du command which is used to display disk usage statistics. It is written in Rust.

Features:

  • 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

8. duf - It is a replacement for df command which displays free disk space. It is written in Go.

Features:

  • 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:

10 Awesome Modern Unix Command-Line Tools
Are you Using Linux or Terminal in macOS? If so, here are some of the cool Command-Line Tools you can use for better productivity and speed. I have another Post for Modern Alternatives to Common Unix Commands. Here’s a list of some of the popular command-line tools: 1. fzf -