How To Create A Directory And Set Permissions At The Same Time

You can create a directory and set the permissions for that directory at the same time using the following command:

mkdir -m777 <foldername>

The above command will create a folder which everybody has access to. It is very rare that you would want to create anything with this kind of permissions.