[CentOS] find with exclude directory

Stephen Harris

lists at spuddy.org
Sun May 11 17:15:55 UTC 2014


On Sun, May 11, 2014 at 12:33:47PM -0400, Tim Dunphy wrote:
> find / -path '/usr/local/digitalplatform/*' -prune -o -name "*varnish*"

Try

  find / -path /usr/local/digitalplatform -prune -o name '*varnish*' -print

Without the explicit -print, find will implicitly add one
e.g
  find / \( -path .... -o -name ... \) -print


-- 

rgds
Stephen



More information about the CentOS mailing list