Suppose I have a map with 10,000 polygons with categories 1 to 10,000 in layer 1. I would like to create a second layer with only the features in layer 1 with categories 1 to 5,000. From the online documentation, it seems I can do it with a combination of v.category, v.to.db and v.db.connect. But v.category does not provide a filtering mechanism when creating a new layer. It seems doable from this link, specifically:
If a vector object has zero categories in a layer, then it does not appear in that layer. In this fashion some vector objects may appear in some layers but not in others. Taking the example of the fields and paths, only some boundaries, but not all, might have a category value in layer 2.
I googled very hard but did not find a single example so far.