I am trying to create a new folder in the main directory
Tried all kinds of examples
sudo mkdir /data/db
sudo mkdir -p /data/db<
If you are on mac and facing the issue then below command is useful, whoami variable will get the current user
whoami
mongod --dbpath=/Users/$(whoami)/data/db