Tag: Linux
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:…
Using M4 Command
This command takes an input file and substitutes strings inside it with the parameters passed, similar to substituting for variables….
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…
Enable Bridging for VirtualBox in Fedora 8
To access net on a guest OS installed within VirtualBox, you have to enable bridging. This is what I did……
Stop crond When mysqld is Down
A perl script to stop crond if mysqld is down #!/usr/bin/perl # See if MySQL server is alive or not…
Recent Comments