Kill processes started by system

July 13th, 2006

Way, way too many times, I've seen some sort of process chewing up all my system processing cycles in Windows. Unfortunately, many times if I try to kill these processes, the system won't let me stating "access is denied". To work around this, use the following command to start up the task manager as "system".

at TIME /interactive taskmgr

where TIME is 1 minute from now.

bash loops and more

July 7th, 2006

Here's some examples of bash loops:

#!/bin/bash
for i in $( ls ); do
echo item: $i
done

#!/bin/bash
for i in `seq 1 10`;
do
echo $i
done

#!/bin/bash
COUNTER=0
while [ $COUNTER -lt 10 ]; do
echo The counter is $COUNTER
let COUNTER=COUNTER+1
done

#!/bin/bash
COUNTER=20
until [ $COUNTER -lt 10 ]; do
echo COUNTER $COUNTER
let COUNTER-=1
done

For more information - check the Bash-Prog-Intro-HOWTO at the Linux Documentation Project

Additionally, here are some related pages:

Bash Shell Loop Over Set of Files
Bash Infinite Loop Examples
Syntax for a single-line Bash infinite while loop

More UDEV information

June 21st, 2006

As I shift to UDEV, it is helpful to know how to get information about a particular device in order to set up a UDEV rule. Here's how to get that information:

udevinfo -a -p `udevinfo -q path -n /dev/sda1`

And here is the command to reload the rules:

udevcontrol reload_rules

Cyrus index rebuild

May 31st, 2006

Here's how to rebuild the indexes for Cyrus IMAP. It uses the program squatter for the indexing. This needs to be run as user 'cyrus'

for i in strav sportchk derv; do /usr/sbin/squatter -r -v user.$i; done

PowerDVD black screen resolved

May 29th, 2006

For some time now I've had issues with PowerDVD for playback. The screen would be black except for the borders where you coould actually see the movie playing. I've done search after search and never found a resolution until now. Apparently there is a conflict with ObjectDock. Simply unload ObjectDock and PowerDVD works like a champ.