Edited the question as per the answer:
I'm using this command line and generated a CSV but I got 0 exports:
mongoexport --host localhost --db schooldbs --collection name --type=csv --out text.csv --fields name,email,mobile,city,birthday,createdAt
I got this response:
2019-12-24T07:28:16.382+0000 connected to: localhost
2019-12-24T07:28:16.386+0000 exported 0 records
What is name in that command line? What am I doing wrong?