Script Delete User Profiles
Looking for a scipt to delete user profiles - hopefully in UNIX but any
automated way will work.
Need to exclude administrator and shared folders or any system folders under /Users
The following is a rough example of what is being worked on but not sure how to exclude administrator from the rm statement.
I am still new to macs thanks
#!/bin/bash
#This deletes all Macintosh profiles except admin,share,.localized
Profile="$Users/*"
Admin="
for Profile in $Profile
do
if [[ -e $Profile ]]
then
rm -rf $Profile
fi
done
exit
IMAC, Mac OS X (10.5.5)