Author: Sahil Suri

How to patch and rollback patch in Redhat/CentOS Linux?

Applying periodic updates on the system in the form of patches to keep the operating system updated and secure is an important job function of every system administrator. Patching the operating system certainly enhances the functionality and health of the system for the better but in case of few isolated instances patching operating systems may cause problems in the working of the application or database. What is a patch? A patch is a piece of software code which will be inserted into existing programme in the system. This is an imidate fix to existing software before a minor release is planned. A patch is a kind of temporary and quick fix to existing software. What is a patch looks like? Suppose you have some xyz.c file within your Linux kernel which require a patch, the patch is a just the difference between the existing line of code in that file and extra lines which we will add to this file. It is just a diff of lines of code which is added to existing file. On Red Hat based systems we use the yum package manager as the preferred method to install and update packages. You may please go through our earlier post on yum which explains the basics of yum and rpm differences and  YUM server setup. In this article, we’ll be using yum to Update system with patches Downgrade system patches...

Read More

9 vmstat command examples in Linux/Unix

  What is vmstat command? In this article, we’ll demonstrate how we can use the vmstat(View memory status) command as an indispensable memory measurement tool. Although the primary intended purpose of vmstat command displays virtual memory statistics about processes, memory, and paging, it also provides information about block I/O, traps, and CPU activity. Verifying that vmstat is availability The vmstat command is installed as a part of the procps package which installs a set of utilities that are used to report system information. This package will be installed on a Red Hat based system by default even if you’ve performed a minimal type installation of the operating system. We will verify that vmstat is available in our system by executing the following commands: [sahil@linuxnix:~] $ which vmstat /usr/bin/vmstat [sahil@linuxnix:~] $ rpm -qf /usr/bin/vmstat procps-3.2.8-36.el6.x86_64 Now that we have verified that vmstat is installed on our system let’s explore some of it’s options. Getting help on vmstat command To view a list of the different options available with the vmstat command type vmstat –help. [sahil@linuxnix:~] $ vmstat --help usage: vmstat [-V] [-n] [delay [count]] -V prints version. -n causes the headers not to be reprinted regularly. -a print inactive/active page stats. -d prints disk statistics -D prints disk table -p prints disk partition statistics -s prints vm table -m prints slabinfo -t add timestamp to output -S unit size delay...

Read More

10 File Globbing examples in Linux/Unix

What is file globbing in Linux? File globbing is a feature provided by the UNIX/Linux shell to represent multiple filenames by using special characters called wildcards with a single file name. A wildcard is essentially a symbol which may be used to substitute for one or more characters. Therefore, we can use wildcards for generating the appropriate combination of file names as per our requirement. What are regular expressions? Is a sequence of symbols which includes alphabets, numbers, special characters like $,^,*,. etc which can be understood by many programming languages to match different string patterns. This is a bit complex but with examples, you can understand them quickly and easily. Please head to our posts on these regular expressions. Types of available file globbing: The bash shell provides three characters to use as wildcards: Asterisk (*) to represent 0 or more characters Question mark (?) to represent exactly one character Square brackets ([]) to represent and match for the character enclosed within the square brackets. In this article, we’ll go through multiple examples of each of the above-mentioned file globbing options to understand their usage. In order this globbing to work properly you should know shopt command globbing options as well. Example 1: Using * expand all disk drives file names with /dev/sda as leading characters. [root@linuxnix ~]# ls -l /dev/sda* brw-rw----. 1 root disk 8, 0 Nov...

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.