Mongoexport of mongo

  mongodb, question
mongoexport -h -d video -c movie --query {\$and:[{site:{\$size:1}},{title:1}]} -f id,title --csv -o /log/mongo/1.csv

I’m always reporting mistakes in the execution of Mongoexport.

However, when I went to execute this query alone, I had data. I don’t know why I reported the error in mongoexport. . . . .

Please know that under the guidance of children’s shoes

What operating system? This is mainly the escape problem of special characters, and there is a problem with your brace estimation system identification here.
Try the following instead:

mongoexport -h -d video -c movie --query "{$and:[{site:{$size:1}},{title:1}]}" -f id,title --csv -o /log/mongo/1.csv