Re: find with exclude directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> On Mon, May 12, 2014 at 4:44 AM, Tim Dunphy <bluethundr@xxxxxxxxx> wrote:
>
>> Thanks. But what if I want to turn that statement into one that will delete
>> everything it finds? I need to preserve the contents of that directory.
>>
>> As in : find / -path '/usr/local/digitalplatform/*' -prune -o -name
>> "*varnish*" -exec rm -rfv {} \;
>>

try something along the lines of:

find / -regex '.*varnish.*' ! -regex '/usr/local/digitalplatform/.*'

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux