Daily Archive Script

#!/usr/bin/ksh
cd ~/Pictures
for dir in `find ./ -maxdepth 1 -type d -mtime 7`
do
	tar cvjpf "${dir}.tar.bz2" "${dir}"
	rm -rf "${dir}"
done
		
ftp -v -n "ftp.lakemasoniccenter.org" <<EOF
user "user" "password"
cd /var/ftp/incoming/media/archive
lcd /home/user/Pictures
mput *.tar.bz2
quit
EOF

rm -rf *.tar.bz2

Disk Space Monitor

I used to have a script copied from UNIX Hints and Hacks for monitoring disk space but that one didn’t work on my box so I deleted it.  I finally got around to finding a better one.  It was originally copied from ‘NixCraft but I modified it heavily so it’s a bit more user friendly and doesn’t break on long device names:

    #!/bin/sh
    # Shell script to monitor or watch the disk space
    # It will send an email to $ADMIN, if the (free avilable) percentage
    # of space is >= 90%
    # -------------------------------------------------------------------------
    # Copyright (c) 2005 nixCraft project <http://cyberciti.biz/fb/>
    # This script is licensed under GNU GPL version 2.0 or above
    # -------------------------------------------------------------------------
    # This script is part of nixCraft shell script collection (NSSC)
    # Visit http://bash.cyberciti.biz/ for more information.
    # ----------------------------------------------------------------------
    # Linux shell script to watch disk space (should work on other UNIX oses )
    # SEE URL: http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html
    # set admin email so that you can get email
    ADMIN="operator@lakemasoniccenter.org"
    # set alert level 90% is default
    ALERT=90
    df -PH | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 " " $6 }' | while read output;
    do
            #echo $output
            usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 )
            partition=$(echo $output | awk '{ print $2 " mounted on " $3}' )
            if [ $usep -ge $ALERT ]; then
                    echo "Running out of space \"$partition ($usep%)\" on $(hostname) as on $(date)" |
                    mail -s "Alert: Almost out of disk space $partition" $ADMIN
            fi
    done

Priorities II

Part of the reason I’ve been confused about what lenses to be looking at for my Rebel T3 is that most fora assume you’re shooting a full-frame sensor like a 1D or 5D.  Standard focal lengths for a crop sensor body are different than standard focal lengths for a full-frame body.  Because of this there are different best-use lenses at each level.  Using this new information and reviews specifically for crop sensor bodies, I’ve put together a good list for my Rebel T3 or a possible future Rebel T2i:

Strategy:  Save money by buying slow but clear zooms.  Use primes when fast lenses are needed.

Ultra-Wide Zoom (optional):  EF-S 10-22mm f/3.5-4.5 USM ($859.99)
Standard Zoom (primary):  EF-S 17-55mm f/2.8 USM ($1179.99)
Telephoto Zoom (secondary):  EF 70-200mm f/4L USM ($709.99)

Standard Telephoto (primary):  EF 50mm f/1.4 USM ($399.99)
Medium Telephoto (secondary):  EF 85mm f/1.8 USM ($419.99)
Macro and Telephoto (optional):  EF 100mm f/2.8 Macro USM ($599.99)

If I were going to build an entirely new collection from scratch, my priorities would be as follows: Standard Zoom, Standard Telephoto, Telephoto Zoom. But since I already have some lenses, my priorities are instead Standard Telephoto, Medium Telephoto, Standard Zoom, Telephoto Zoom (The only one I currently have isn’t very good).