awk grep sed 1. Overview In this article, we’ll go through the command-line tools grep, sed, and awk. In particular, we’ll study the differences in functionality among them. 2. Background When it comes to text processing in Linux, the three tools that come in pretty handy are grep...
In an earlier article, we have explained to you thedifference between sudo and su commandsin Linux. These are two important commands used to implement security in Linux, in regards to user management policy and user permissions. Thesucommand is used to switch to another user, in other words ...
If the number of commands, user is supposed to run is under10, we can place all the commands alongside, with white space in between them, as shown below: mark beta.database_server.com=(cat) /usr/bin/command1 /usr/sbin/command2 /usr/sbin/command3 ... If this list of command varies...
The su command switches to the super user -- or root user -- when you execute it with no additional options. You'll have to enter the root account's password. This isn't all the su command does, though -- you can use it to switch to any user account. If you execute thesu bobc...
For finding difference between two versions of a file on Linux, you can use any one of the 4 tools explained in this article — diff, colordiff, wdiff, and vimdiff. The screenshots provided for these tools shows the difference between the following two empfile1.txt and empfile2.txt. ...
The diff command output can get little confusing to read when you diff two files that has lot of differences. Wouldn’t it be nice to view the file differences visually? vimdiff utility gives a better visual feeling of differences between files as explai
Normally, tocompare two files in Linux, we use thediff– a simple and original Unix command-line tool that shows you the difference between two computer files; compares files line by line and it is easy to use, comes with pre-installed on most if not all Linux distributions. ...
Above highlighted are the differences between‘grep’,‘egrep’and‘fgrep’. Apart from difference in the set of regular expressions used, and speed of execution, rest command line parameters remain same for all the three versions of grep and even instead of “egrep” or “fgrep”, “grep -...
Whilelocalhostand127.0.0.1ultimately refer to the same thing (your own machine), there are a few differences between them: Format: localhostis a hostname. 127.0.0.1is an IP address. Usage: localhostcan beused in commands, configuration files, or URLs as a symbolic name. ...
Here, one distinguishing feature betweenipandifconfigis that whereas ifconfig only shows enabled interfaces, ip shows all the interfaces whether enabled or disabled. ifconfig Command $ ifconfig ifconfig: Check IP Address ip Command $ ip a ...