Skip to main content

Posts

Showing posts from 2015

10 Linux methods you should know

This article is a compilation of several interesting, unique command-line tricks that should help you squeeze more juice out of your system, improve your situational awareness of what goes on behind the curtains of the desktop, plus some rather unorthodox solutions that will melt the proverbial socks off your kernel. Follow me for a round of creative administrative hacking. 1. Run top in batch mode top is a handy utility for monitoring the utilization of your system. It is invoked from the command line and it works by displaying lots of useful information, including CPU and memory usage, the number of running processes, load, the top resource hitters, and other useful bits. By default, top refreshes its report every 3 seconds. Most of us use top in this fashion; we run it inside the terminal, look on the statistics for a few seconds and then graciously quit and continue our work. But what if you wanted to monitor the usage of your system resources unattended? In other words,...
Regular Expressions and Extended Pattern Matching Here is a table of the Solaris (around 1991) commands that allow you to specify regular expressions: Utility Regular Expression Type vi Basic sed Basic grep Basic csplit Basic dbx Basic dbxtool Basic more Basic ed Basic expr Basic lex Basic pg Basic nl Basic rdist Basic awk Extended nawk Extended egrep Extended EMACS EMACS Regular Expressions PERL PERL Regular Expressions The Anchor Characters: ^ and $ Most UNIX text facilities are line oriented. Searching for patterns that span several lines is not easy to do. You see, the end of line character is not included in th...