Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Mac terminal, is it possible to create a folder of folder?

I’d like to create a folder ubuntu/airflow/dags/survey_tools under my home directory. But I don’t want to create it fold by fold. Could I make it with only 1 command?

(base) xxxx@xxxx-MacBook-Pro /home % pwd
/home
(base) xxxx@xxxx-MacBook-Pro /home % ls
(base) xxxx@xxxx-MacBook-Pro /home % 
(base) xxxx@xxxx-MacBook-Pro /home % mkdir -p ubuntu/airflow/dags/survey_tools
mkdir: ubuntu/airflow/dags/survey_tools: Operation not supported

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Yes, that’s mkdir -p

mkdir -p ubuntu/airflow/dags/survey_tools

From man mkdir:

-p
Create intermediate folders as required. If this option is
not specified, the full path prefix of each operand must already
exist. On the other hand, with this option specified, no error
will be reported if a directory given as an operand already
exists.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading