mkdir
is short for make directories
, used to create directories. By default, if the directory to be created already exists, it prompts that it already exists instead of continuing to create the directory. mkdir
command can create multiple directories at the same time.
Command format:
mkdir [参数] [目录]
Example:
# 创建test目录mkdir test # 递归创建目录,A也是一个目录mkdir -p test/A # 同时创建多个目录mkdir test1 test2 test3 # 创建目录,并赋予755权限,即属主有读写执行mkdir -m 700 test
This article is reprinted from https://xugaoxiang.com/2022/06/01/linux-cmds-2-mkdir/
This site is for inclusion only, and the copyright belongs to the original author.