I've been working on a script for my boss so that he can automate going through ftp accounts and getting rid of "unnecessary" files like .exes and .mp3s. Some people are actually smart enough to rename files so i am using the file command to find the renamed files. I have not been able to get this up and running yet so I brought it to this GREAT

forum and hopefully someone will be able to pick it apart and help give me some idea of what i need to change. Any thoughts, help or suggestions would be appreciated.
#!/bin/bash
ls /home/*/ > temp.txt <--Not sure how to make this recursive
while [ -n $1 ]
do
loc = locate $1
f=file loc | tr -s " " " " | awk '/.*xec.*/ {print}' | cut --delimiter= " "
--fields=1 | tr -d ":"
if [ -n $f ]
then
echo Removing Illegal File $f
rm -rf $f <-- I know the the rf is a bit excessive
fi
done < temp.txt
rm -rf temp.txt <--Same here but i wanna make sure the file is gone