Quoth Bob Proulx <mailto:bob@proulx.com>:
> Gavin Lambert wrote:
>> I haven't tried this myself (so try it without the 'rm' first to make
>> sure it gives the right results!), but this ought to remove all files
>> except for the .svn folders, starting from the current directory:
>>
>> find . | grep -v .svn | xargs rm -f
>
> That find command with "grep" looks very suspicious to me.
> Perhaps you wanted to suggest something like this instead?
>
> find . -type d -name .svn -prune -o -type f -print0 | xargs -r0 ls
> -ldog
>
> And after inspecting for safety then replace the "ls -ldog"
> with "rm -f"?
Yes, someone else suggested the same thing the next day.
I didn't like the find with grep either, but (since I had forgotten the
'-o -type f -print' bit) using just -prune resulted in printing all the
.svn folders, not all *but* the .svn folders. I was in a hurry, so I
didn't have time to experiment much further :)
The man page I've got on find wasn't particularly forthcoming either,
and didn't explain how -prune interacts with the other options.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Aug 21 00:43:58 2006