Here’s just a short information sharing, on how I recently upgraded a few of the most used common standard Unix tools that I use daily, to more modern alternatives that makes me a lot more productive!
- Searching for text and patters
- Searching for files
- Viewing text files
less(or some would use
What is nice about for example
fd is that they are very much faster than the older traditional tools. The experienced difference is huge! They also both respect
.gitignore files excluding whatever the list from the search. Over the past 10 years as the software development industry as fully adopted git and we have more and more of our work distributed with git, most of my files in my file system are in some git repository. Not searching generated, compiled or cache files by default is just what is needed. These tools are adapted to make the most common use cases simple. With grep I would often do
$ grep -nr search-text . to search recursively from the current directory and show line numbers of matches. With
rg I can just do
$ rg search-text.
bat tool just makes it nice to get syntax highlighting when viewing a source code file, which was always a mess to set up with tools like
less. I would still use the old
cat for simple concatenation of texts though.
Note of caution; these tools can improve the everyday tasks but should most likely not be used in any scripting. For scripting, we should rely only on POSIX Portable Operating System Interface - a standard for Unix-like systems.
Share onTwitter Facebook LinkedIn
Leave a comment
Your email address will not be published. Required fields are marked *