incrond cannot exec process: No such file or directory

Inside you incrontabs, you must leave only 1 space between the . If you leave 2 or more spaces, then the 2nd (and more) spaces will be considered part of the or and it will fail… I was leaving 2 spaces between and , and incron did not work and in /var/log/syslog there were these…

Cool chkconfig replacement for Ubuntu

Hi,   Ubuntu does not carry chkconfig any more .. besides the standard update-rc.d apache2 defaults or update-rc.d apache2 remove There is a cool tool called : sysv-rc-conf. This tool can be installed using : sudo apt-get install sysv-rc-conf On its own the command opens a cool ncurses interface like this :      …

Snapshot backup using cp -al and rsync

This script requires genuine cp -al capable gnu and rsync commands together with a hardlink capable FS + OS.     #!/bin/bash [ $# -ne 2 ] && echo “Incorrect usage : $0 <source path> <target path>” && exit 128 ; SOURCEFOLDER=$1 TARGETFOLDER=$2 SF_LEN=${#SOURCEFOLDER}-1 TF_LEN=${#TARGETFOLDER}-1 #echo “Last character in source folder is ${SOURCEFOLDER:SF_LEN}” if […

Progress bar in bash

a=0; for i in `cat $FOLDERLIST` do ((a++)) percentage=`awk -v a=$a -v b=$NUMBEROFFOLDERS 'BEGIN {printf "%3.0f", a / b * 100; exit } '` arrow=`printf '=%.0s' $(seq 1 $percentage)` headed=`printf '%s%s' $arrow '>'` paddedarrow=`printf '%-102s' $headed` echo -ne "$paddedarrow $a/$NUMBEROFFOLDERS [$percentage] \r " done echo njoy  😉

pre-pend log timestamp

Adds a timestamp before alog from a script awk -v sec=$(date -u +%s) '{print strftime("%Y-%m-%d %H:%M:%S",sec), $0; fflush();}' in cron : awk -v sec=$(date -u +\%s) '{print strftime("\%Y-\%m-\%d \%H:\%M:\%S",sec), $0; fflush();}' So : # echo hello world | awk -v sec=$(date -u +%s) '{print strftime("%Y-%m-%d %H:%M:%S",sec), $0; fflush();}'   2014-10-30 08:40:26 test nJoy 🙂

VBS script to gather all IIS 6 Sites , state and folders for storage

This is a script from this site which I found particularly handy. OPTION EXPLICIT DIM CRLF, TAB DIM strServer DIM objWebService TAB = CHR( 9 ) CRLF = CHR( 13 ) & CHR( 10 ) IF WScript.Arguments.Length = 1 THEN strServer = WScript.Arguments( 0 ) ELSE strServer = "localhost" END IF WScript.Echo "Enumerating websites on…