If you've been a Linix/UNIX user for a long time you surely know what RTFM means (Read The *bleep* Manual). I'd like to offer up a new, related acronym, RRTFM, for Re-Read The *bleep* Manual.
My first exposure to *NIX was decades ago and just recently somebody pointed out some new options to grep that I've found very useful since then (more about those below). Now, if I'd re-read the man page during the last few years these wouldn't have been so new to me and the richness that it's brought to my life would have been extended by years.
Specifically, the new grep options that I've found to be quite useful are:
- -P or --perl-regexp makes grep interpret the pattern you pass as a perl compatible regular expression (PCRE). PCREs are often much more convenient, and often more powerful, than grep regular expressions.
--color causes the matched text to be colorized on output.
This is particularily useful when you're grepping files with long lines,
it makes the match stand out.
Note: Normally grep doesn't colorize when its output is going to a pipe, so if you're piping the output into more or less you want to do --color=always to get the colorization.
- -o or --only-matching causes the matched text and only the matched text to be output, all other text in the line is not displayed.
- -r, -R or --recursive causes directories to be recursed and the files within them to be searched. By itself this turns out not to be as useful as you'd like, you probabaly need to use the --include and --exclude options to specify the files to be searched.
We all know that the rate of change is rapid, and that goes for the old standbys that we use everyday, so it pays to re-read the man/info pages now and then to check for new and useful features. If you don't like that option, then talk to new users. The person that pointed this out to me is fairly new to Linux and so their first reading of the manual was much more recent than mine.
Mitch Frazier is an Associate Editor for Linux Journal.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Server Hardening
- BitTorrent Inc.'s Sync
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- New Container Image Standard Promises More Portable Apps
- The Humble Hacker?
- The Death of RoboVM
- Open-Source Project Secretly Funded by CIA
- The US Government and Open-Source Software
- EnterpriseDB's EDB Postgres Advanced Server and EDB Postgres Enterprise Manager
- ACI Worldwide's UP Retail Payments
In modern computer systems, privacy and security are mandatory. However, connections from the outside over public networks automatically imply risks. One easily available solution to avoid eavesdroppers’ attempts is SSH. But, its wide adoption during the past 21 years has made it a target for attackers, so hardening your system properly is a must.
Additionally, in highly regulated markets, you must comply with specific operational requirements, proving that you conform to standards and even that you have included new mandatory authentication methods, such as two-factor authentication. In this ebook, I discuss SSH and how to configure and manage it to guarantee that your network is safe, your data is secure and that you comply with relevant regulations.Get the Guide