This is how you could use find command to exclude files/file pattern.
in Solaris
# find /var ! \( -name filename -o -name filename.* \) -print
where ;
! = not equal to ( in solaris cannot use "-not")
\( = begin complex expresssion
-o = or
\) = end complex expression
In linux ;
# find /var -not \( -name filename -o -name filename.* \) -print
where ;
-not = not equal to ( ! can also be used as in solaris)
\( = begin complex expresssion
-o = or
\) = end complex expression
source : http://www.athabascau.ca/html/depts/compserv/webunit/HOWTO/find.htm
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION )
e.g.
mail:~# find /var/log/courier ! \( -name *.bz2 \) -print
Thanks for the posting though - I tried looking at fnmatch(3) (couldn't find) and via google which brought up the opengroup site, but it appeared to require plenty of reading and was quite terse.
David.