mkdir's “-p” option

后端 未结 5 1809
南方客
南方客 2021-01-30 00:26

So this doesn\'t seem like a terribly complicated question I have, but it\'s one I can\'t find the answer to. I\'m confused about what the -p option does in Unix.

5条回答
  •  醉梦人生
    2021-01-30 01:24

    Note that -p is an argument to the mkdir command specifically, not the whole of Unix. Every command can have whatever arguments it needs.

    In this case it means "parents", meaning mkdir will create a directory and any parents that don't already exist.

提交回复
热议问题