Add a Virtual IP Address in Linux

nano /etc/sysconfig/network-scripts/ifcfg-eth0 Should look something like this DEVICE=eth0 BOOTPROTO=static BROADCAST=172.16.0.255 HWADDR=00:00:00:00:00:00 IPADDR=172.16.0.2 NETMASK=255.255.255.0 NETWORK=172.16.0.0 ONBOOT=yes Duplicate that and open the new file cp...

Restart Ensim via CLI

After a few months of continuous use, I’ve found Ensim to start using too much swap space and getting sluggish. A quick restart via command line, always fixes both: /etc/init.d/epld restart

Pause a Linux Shell Script using Sleep

It’s easy to pause a shell script during execution. Just add: sleep 10 (where 10 is the number of seconds you want the script to pause.) Some code for testing would be… #!/bin/sh before=”$(date +%s)” echo $before sleep 3 after=”$(date...

Shell script date calculations

#!/bin/sh before=”$(date +%s)” echo $before sleep 5 Ymd=”$(date ‘+%Y%m%d’)” echo $Ymd after=”$(date +%s)” echo $after elapsed_seconds=”$(expr $after – $before)” echo Elapsed time for code block:...