-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 !!!WARNING!!! this is not tested or debugged. I just wrote it. ARRRGH. I keep typing chmod instead of chown. #!/bin/sh USER1=$1 USER2=$2 MYPATH=$3 usage() { echo "Script to change ownership of files from user X to user Y" echo "$0 [path to search]" echo } if [ -z "$USER1" ] ; then echo "Invalid user 1"; usage ; exit 1; fi if [ -z "$USER2" ] ; then echo "Invalid user 2"; usage ; exit 1; fi if [ -z "$MYPATH" ] ; then MYPATH="./" ; exit 1; fi UID1=`grep $USER1 /etc/passwd | awk -F: '{print $3;}' ` UID2=`grep $USER2 /etc/passwd | awk -F: '{print $3;}' ` if [ -z "$UID1" ] ; then echo "Invalid user 1"; usage ; exit 1; fi if [ -z "$UID2" ] ; then echo "Invalid user 2"; usage ; exit 1; fi chown `grep $USER1 /etc/passwd | awk -F: '{print $1;}'` \ `find $MYPATH -uid $UID2` - -- JT Morée PC Xperience, Inc. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFJE461JwGi/ukQqERApBxAJ4gPnmzLZGhgbH5vblBI+3WSWnL+QCgj39O OmGaEFNCCLzbZrWACQfkuXQ= =9LQB -----END PGP SIGNATURE----- -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change you mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss