Subject: Re: bug#15259: Request fror a feature rather

From: Eric Blake <[email-masked]>
Date: Tue, 03 Sep 2013 10:43:58 -0600

On 09/03/2013 12:39 AM, Abbas Chunawala wrote:
> Hi,
> Greetings.
> 
> There should also be a feature in rm which removes all files except the
> mentioned files.
> What do you think ?

I think it is probably a case of feature bloat, as you can already
achieve the same using existing standard tools; for example:

find dir -name filetokeep -o -exec rm {} +

which will remove all files in a hierarchy except those excluded by the
left side of the -o predicate (in this case, preserving the file named
"filetokeep").

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org