Stupid shell tricks

Kill off old idle processes.

Create a file: .killidle , which holds the number of waits to wait before killing off old idle processes.
#!//usr/bin/csh
 if ( -r .killidle ) w -s $LOGNAME | gawk -v ndays=`cat .killidle` '/days/ {if (substr($3,1,length($3)-4) > ndays ) system("ps -f -t" $2 "|/pkg/local/bin/pskill -9")}'
 
If the file .killidle exits,
display info about my logins (short form),
with gawk we pass the idle days parameter and scan for lines with days, grab the number of days, chop off 'days', if its been to long invoke ps and select user by terminal and kill.

Kodak Picture CD, Linux and VMWare

Running windows XP under VMWare on Linux seems to prevent one from mounting a Kodak Picture CD and seeing the pictures directory (missing).
mount /dev/cdrom -o ro,session=3 /mnt/cdrom     did not really help.
disabling the CD in VMWare did the trick (VM -> Removeable Devices -> ide1:0 -> disconnect (or edit)).
cdrecord -toc dev=0,0,0
is amusing, linux could use a better cd-r driver.