3 echo $(basename $0): needs at least one directory name as a parameter.
4 #hmmm: set the first parm to . instead.
7 export outfile="$(mktemp "$TMP/zz_findertmp.XXXXXX")"
8 # check for files not owned by the user.
9 echo "These files are not self-owned by $USER:" >$outfile
11 find $i ! -user $USER >>$outfile
13 # check for files not in same group as the user.
14 GROUP="$(groups | awk '{print $1}')"
15 # assumption above that the first group is the 'primary' one.
16 echo "These files are not owned by primary group of $GROUP:" >>$outfile
18 find $i ! -group $GROUP >>$outfile