How to take backup based on ISODate or ObjectID using mongodump v4.2.2?

$ is a variable. (linux, macos)
Escape the $.

Like this.
-q "{'_id':{'\$lte':ObjectId('ffffffff0000000000000000')}}"