Linux directory creation command (mkdir command)

1. Grammar

A new directory (folder) can be created through the mkdir command. mkdir comes from English: Make Directory

Function: Create folder

grammar:mkdir [-p] 参数

  • Parameter: required, indicating the Linux path, that is, the path of the folder to be created, either a relative path or an absolute path.

  • Options: -p, optional, means to automatically create non-existing parent directories, suitable for creating continuous multi-level directories

Note: Creating a folder requires modifying permissions. Please ensure that the operations are within the HOME directory . Do not operate outside HOME because permission issues are involved. It will not succeed outside HOME. We will explain the knowledge of permission control in the future.

2.Examples

Ⅰ.Create a single directory

Ⅱ.Create multi-level directories

Guess you like

Origin blog.csdn.net/lemonzjk/article/details/135438289