4 classic Linux tools that have better modern alternatives
These programs are not available so you will need to install them yourself. And it's best to use them locally, for one-time tasks, rather than depending on them for scripting. However, you might discover a handy feature here, whether it's syntax highlighting, faster processing, or simply a more intuitive interface.
1. bat is cat with syntax highlighting and Git integration
Short for 'concatenate', the cat tool is probably rarely used to join files together, but only to display them. Because it sends input to standard output, cat creates a very basic, general-purpose file viewer. But typically you'll want more features when viewing file content, and bat is a specific tool designed to provide those features.
bat is great for quickly paging through text files, like a set of log files or source code. It provides a title for each file, adds line numbers, and uses colors to highlight the syntax of various file types. The bat command supports use with other popular tools and is highly compatible with cat's option set.
If you're a programmer, you'll appreciate bat's git integration. The tool's output will include comments for lines with local changes in the sidebar. You can even set it up to act as the default viewer for manual pages via man, improving their readability.
2. ripgrep is a recursive grep
grep has many uses as a powerful search engine. By leveraging the power of regular expressions, text searching will be taken to a new level. ripgrep has two main improvements: Recursive search and git integration.
The grep tool will normally search recursively inside subfolders with the -R option, making searching through all files in the project much more convenient. But ripgrep does this by default. ripgrep respects every .gitignore file it finds, so it will not search for files that do not belong to the archive.
ripgrep also tends to run faster than grep and other alternatives. And its default output is probably what you're usually looking for, with standard syntax highlighting and line numbers.
3. lsd is ls with preferred format
The ls command is one of the first commands that Linux users learn because it is one of the most useful. This tool - short for LSDeluxe - upgrades it with beautiful colors and graphical icons.
Like ls's -G option, lsd adds color to each file depending on its type: Directory, executable, symlink, etc. But it also adds icons representing the file format, from HTML files to C source code. It turns the usual terminal file listing into something that looks more like a GUI file browser.
lsd also comes with the --tree option which provides hierarchical output without the need for a separate tool.
4. fd is find friendlier
Of all the standard command line utilities, find is probably the most difficult to use. It's a valuable way to find files, but the syntax and general usage of the command is quite unique. Therefore, it can be difficult to remember how to use find correctly. If so try fd!
Without arguments, fd will give you a color-coded list showing all files and directories below the current directory. You can pass it simple text or a pattern to search for specific file names.
The fd command supports many other options, from case sensitivity to searching for file extensions and executing the command. Like ripgrep, it respects any .gitignore settings it finds, meaning it's a particularly good tool for searching through source code repositories.
You should read it
- 14 interesting Linux commands in Terminal
- Compare the most popular Linux distributions today
- 7 best Linux distributions based on Red Hat
- Basic Linux commands everyone needs to know
- What's new in Linux Kernel 5.18?
- 6 reasons why the Linux operating system often fails
- 8 best Linux distros for pentest
- Why are Linux computers still important?
- 10 reasons to switch to Linux right in 2012
- What is Puppy Linux? Everything you need to know about Puppy Linux
- The 5 most awaited things in Linux in 2019
- How does the Linux Kernel work?
Maybe you are interested
9 ways to fix the error of not being able to save files as JPEG or PNG in Photoshop
Download standard and beautiful Word file experience initiative cover template
How to use the file search command on Windows, find saved files
How to split sheet into multiple separate Excel files
How to merge PDF files, merge and join multiple PDF files into a single file
How to clean up iPhone junk, delete junk files to free up iPhone storage