Author: Binny V A
Find Current IP Address
Find the IP address of all the active interfaces. ifconfig | egrep -o ‘^[a-z0-9]{1,12}|inet addr:[0-9.]+’
Basic Diff
If you use the diff command, you will be able to see the difference between the files as shown below:…
Recursive Grep
Recursively check a folder to find the given text using grep grep -R “text” *
Using M4 Command
This command takes an input file and substitutes strings inside it with the parameters passed, similar to substituting for variables….
Install DDClient
DDClient is a tool that lets you auto update your ip with services like dyndns.org. This is how you install…
Run a Command if Another Command Succeeds
This will let you run a linux command based on the success of anther command. Note: This will only work…
Pid Command
Create a command that will return the pid of the given command string.. #!/bin/sh ps aux|grep 1|head -n1|awk ‘{print2}’
Sort a File
A Linux command to sort the contests of a file sort file.ext [tags][/tags]
Some Processor Intensive Commands
I run these commands when I am off for lunch or something… sudo /bin/bash /usr/sbin/makewhatis -w sudo /usr/bin/updatedb #These two…
Recent Comments