Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 May 2011 16:55:14 -0500
From:      "Jack L. Stone" <jacks@sage-american.com>
To:        Rolf Nielsen <listreader@lazlarlyricon.com>
Cc:        Eitan Adler <lists@eitanadler.com>, freebsd-questions@freebsd.org
Subject:   Re: find and remove ?
Message-ID:  <3.0.1.32.20110515165514.0195b6e0@sage-american.com>
In-Reply-To: <4DD015D2.6070904@lazlarlyricon.com>
References:  <4DD01257.1070905@lazlarlyricon.com> <3.0.1.32.20110515110806.0195b6e0@sage-american.com> <3.0.1.32.20110514171011.018a0598@sage-american.com> <BANLkTinfwahWPuQEQYoxcBJBqgpTNH2FqA@mail.gmail.com> <3.0.1.32.20110515102740.0195b6e0@sage-american.com> <BANLkTinCHBC=V61Pxv1PMVRZsmSfUyGZAA@mail.gmail.com> <3.0.1.32.20110515110806.0195b6e0@sage-american.com> <3.0.1.32.20110515124117.0195b6e0@sage-american.com> <4DD01257.1070905@lazlarlyricon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 08:05 PM 5/15/2011 +0200, Rolf Nielsen wrote:
>2011-05-15 19:50, Rolf Nielsen skrev:
>> 2011-05-15 19:41, Jack L. Stone skrev:
>>> At 12:19 PM 5/15/2011 -0400, Eitan Adler wrote:
>>>>> The comamnd:
>>>>> #find /path/to/start/deleting -type d -name _vti_\*
>>>>> worked fine to give the listing of what to delete, but when just
>>>>> adding the
>>>>> "-delete" at the end didn't delete, just ran the listing again.
>>>>
>>>> I forgot that adding the -type d won't let it delete non-empty
>>>> directories. Try running it like:
>>>> find /path/to/start/deleting -name _vti_\* -delete
>>>>
>>>>>
>>>>> (^_^)
>>>>
>>>>
>>>
>>> Nope. Thate didn't delete either.
>>>
>>> Jack
>>>
>>> (^_^)
>>> Happy trails,
>>> Jack L. Stone
>>>
>>> System Admin
>>> Sage-american
>>> _______________________________________________
>>> freebsd-questions@freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>>> To unsubscribe, send any mail to
>>> "freebsd-questions-unsubscribe@freebsd.org"
>>>
>>
>>
>> find /path/to/start/deleting -name _vti_\* -exec rm -Rd {} \;
>
>Pardon my answering my own post, but after reading the find manpage, I 
>think perhaps
>
>find -d /path/to/start/deleting -type d -name _vti_\* -exec rm -Rd {} \;
>
>would be better. The -d option makes find visit the contents of a 
>directory before the directory itself. The one without the -d option
>deletes the topmost directory it finds and then tries to traverse 
>downwards, which of course causes a warning. It still works though.
>

Thanks for the follow-up. I'll try it too.

Jack

(^_^)
Happy trails,
Jack L. Stone

System Admin
Sage-american



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.1.32.20110515165514.0195b6e0>