don't forget to escape that exclamation point if typing on bash.
On Tue, May 13, 2014 at 1:50 AM, Nicolas Thierry-Mieg <
nicolas.thierry-m...@imag.fr> wrote:
> > On Mon, May 12, 2014 at 4:44 AM, Tim Dunphy
> wrote:
> >
> >> Thanks. But what if I want to turn that statement into one that will
>
> On Mon, May 12, 2014 at 4:44 AM, Tim Dunphy 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*"
Why not copy the directory elsewhere, then delete the rest and move it
back? You'd take a copy of it anyway, if it is important, right?
Cheers,
Cliff
On Mon, May 12, 2014 at 4:44 AM, Tim Dunphy wrote:
> Thanks. But what if I want to turn that statement into one that will delete
> everything i
On 05/11/2014 01:06 PM, Tim Dunphy wrote:
> Hal & Jack
>
> Both are perfect! Thanks
>
> [root@uszmpwsls014lb ~]# find / -print | grep -v digitalplatform | grep
> varnish
> /var/lib/varnish
> /var/lib/varnish/uszmpwsls014lb
> /var/lib/varnish/uszmpwsls014lb/_.vsl
> /var/lib/varnish/varnish_storage
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 ..
Hal & Jack
Both are perfect! Thanks
[root@uszmpwsls014lb ~]# find / -print | grep -v digitalplatform | grep
varnish
/var/lib/varnish
/var/lib/varnish/uszmpwsls014lb
/var/lib/varnish/uszmpwsls014lb/_.vsl
/var/lib/varnish/varnish_storage.bin
/usr/lib64/libvarnish.so.1
/usr/lib64/libvarnishapi.so.1
On Sun, 2014-05-11 at 12:33 -0400, Tim Dunphy wrote:
> Hey all,
>
> I'm trying to do a find of all files with the phrase 'varnish' in the
> name, but want to exclude a user home directory called
> /usr/local/digitalplatform.
find / -path /usr/local/digitalplatform -prune -name \*varnish\* doesn'
find / -print | grep -v digitalplatform | grep varnish | xargs rm
But test this first - you don't want to remove anything by accident.
On Sun, May 11, 2014 at 11:44 AM, Tim Dunphy wrote:
> Thanks. But what if I want to turn that statement into one that will delete
> everything it finds? I need
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 {} \;
I'm thinking the grep -v would be a visual thing,
So:
find / -print | grep -v digitalplatform | grep varnish
On Sun, May 11, 2014 at 11:39 AM, Hal Wigoda wrote:
> Just grep it out.
>
> find . -print | grep -v digitalplatform
>
> -v excludes
>
> On Sun, May 11, 2014 at 11:33 AM, Tim Dunphy wrote:
>> Hey all,
>>
>> I'm trying to do a find of
Just grep it out.
find . -print | grep -v digitalplatform
-v excludes
On Sun, May 11, 2014 at 11:33 AM, Tim Dunphy wrote:
> Hey all,
>
> I'm trying to do a find of all files with the phrase 'varnish' in the
> name, but want to exclude a user home directory called
> /usr/local/digitalplatform.
Hey all,
I'm trying to do a find of all files with the phrase 'varnish' in the
name, but want to exclude a user home directory called
/usr/local/digitalplatform.
Here's what I was able to come up with:
find / -path '/usr/local/digitalplatform/*' -prune -o -name "*varnish*"
Which results in thi
12 matches
Mail list logo