[CS-FSLUG] find and .gvfs

Mark Clayton clayton256 at gmail.com
Sat Jul 9 19:17:00 CDT 2011


I'm trying to write a bash script to find all files that are not being owned
by a user or group:
find / -path '.gvfs' -prune -o -path '/proc' -prune -o -nouser -o -nogroup
-print
if [ $? -eq 0 ]
then
exit $STATE_OK
else
echo "Files with no owner or group found"
exit $STATE_CRITICAL
fi

The script basically works except it stumbles on a directory created by the
gnome virtual filesystem daemon called .gvfs. The results are:
find: `/home/mark/.gvfs': Permission denied


The directory gets created with the attributes:
dr-x------  2 mark mark       0 2011-07-07 21:54 .gvfs

Does anyone have any idea how I can get find to not trip up on this
directory so the script can exit with the correct return value?

Thanks,
Mark
--
claytoncapers.blogspot.com
www.mark-clayton.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ofb.biz/pipermail/christiansource_ofb.biz/attachments/20110709/94c57bf0/attachment.htm>


More information about the Christiansource mailing list