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.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Tech Tip: Really Simple HTTP Server with Python
- Non-Linux FOSS: Caffeine!
- Managing Linux Using Puppet
- Google's SwiftShader Released
- Parsing an RSS News Feed with a Bash Script
- Doing for User Space What We Did for Kernel Space
- SuperTuxKart 0.9.2 Released
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide