Tuesday, April 14, 2009

the /dev/socksys disappearing trick

For the past couple of months I’ve been manually creating /dev/socksys on my development virtual machine only for it to disappear when I reboot.

The reason for this is that /dev is now regarded as a virtual directory and is rebuilt by udev from scratch every time the system is rebooted.

The solution to this is to cp -R [device] /lib/udev/devices.

When you reboot you will find the device in /dev.

mknod /dev/socksys c 30 0
chmod 777 /dev/socksys
chmod +s /dev/socksys

cp -R /dev/socksys /lib/udev/devices

Thursday, October 9, 2008

Deleting a Vista Directory you don't have access to.

I use delta copy on Vista ultimate to backup several windows machines as well as my cvs repository on Linux. I inadvertedly configured the service to start as a network service but found I couldn't access the backup at all. I subsequently changed it to start as my user and could access the new directories but was left with a backup directory I couldn't access or delete.

This is how I eventually managed to delete the directory.

Start accessories right click on the command prompt and select run as administrator. At the command line type

takeown /F [directory] /R

cd [directory]

cacls *.* /T /G "[PC NAME\USER NAME]" :F

cd ..

rd [directory] /s

Monday, September 1, 2008

proxy usage?

Quick script to give me usage for a particular url on my proxy server.

usage.sh URL

# !/bin/sh
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.9 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' > $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.8 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.7 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.6 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.5 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.4 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.3 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.2 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.1 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log

Gives the result set in URL.log

Friday, August 8, 2008

Sco binaries on opensuse 11.0

I've got my sco coff files to run on opensuse 11.0 using ibcs-3.7

Yehaw!!

Friday, August 1, 2008

Free reporting tool

Check out http://www.freereporting.com/ for a free reporting tool which is also available in java.

Thursday, January 24, 2008

NRF

I attended the NRF show in New York last week and was amazed at the size and scope of the exhibition. Microsoft even gave me a free vista business OS for attending their presentation on digital advertising. I found the following interesting.

Business Intelligence Exhibitors:
Retail Standards:

ARTS - Association for Retail Technology Standards

Data Security Exhibitors:
Hardware:

Friday, January 4, 2008

Website development the easy way

Found just what I need to churn out a professional looking static website.

templatesbox