Create New Document

The title of your document (will be displayed as H1)
URL-friendly name (no spaces, use dashes)
Path where to create document (optional, use forward slashes to create subdirectories)

Move/Rename Document

Current location of the document
New path for the document (including the slug)
This only changes the document's path. It does not modify the document's title (H1 heading).

Delete Document

Are you sure you want to delete this document? This action cannot be undone.

Warning: If this is a folder, all contents including subfolders and documents will be deleted.

Message

Message content goes here.

Confirm Action

Are you sure?

Attachments

Allowed file types: jpg, jpeg, png, gif, svg, webp, txt, log, csv, sfd, zip, pdf, docx, xlsx, pptx, mp4 (Max: 10MB)

Document Files

Loading attached files...

Document History

Previous Versions

Loading versions...

Preview

Select a version to preview

Wiki Settings

Language for the user interface
Number of versions to keep per document. Set to 0 to disable versioning.
Maximum allowed file size for uploads in MB.

User Management

Add New User

Leave empty to keep current password
Users with these groups can access restricted sections.

Define path-based access rules for sections of your wiki, then assign users to groups in the Users tab. Rules are evaluated in order. First match wins.

Active Rules

Import markdown files from a ZIP archive. Files will be processed and stored in the appropriate document structure. Directory structure in the ZIP (category/subcategory) will be preserved in the wiki.

Upload a ZIP file containing markdown (.md) files to import.

Create and manage backups of your wiki data. Backups include all documents, images, and configuration files.

Available Backups

Loading backups...

Add/Edit Access Rule

Selected: /

Add Column

Banner

mkdir

mkdir 命令详解

mkdir 必须有SUDO权限

mkdir 全称:Make Directory(创建目录)

用法:mkdir [选项]... 目录名...
创建指定的目录(如果它们尚不存在)。

长选项的必选参数对短选项同样适用。

选项说明:
  -m, --mode=模式     设置文件权限模式(类似 chmod),默认为 a=rwx - umask
  -p, --parents       若目录已存在不报错,并自动创建所需的父级目录
  -v, --verbose       为每个创建的目录输出提示信息
  -Z                   设置每个创建目录的 SELinux 安全上下文为默认类型
      --context[=CTX]  类似 -Z,或指定 CTX 设置 SELinux/SMACK 安全上下文
      --help           显示此帮助信息并退出
      --version        输出版本信息并退出

GNU coreutils 在线帮助:<https://www.gnu.org/software/coreutils/>
完整文档:<https://www.gnu.org/software/coreutils/mkdir>
或通过本地命令查看:info '(coreutils) mkdir invocation'

常用案例

1. 基本用法 - 创建单个目录

mkdir myfolder
# 在当前目录下创建名为 myfolder 的目录

2. 创建多个目录

mkdir dir1 dir2 dir3
# 一次创建 3 个目录

3. 递归创建 - 创建多级目录(最常用 ⭐)

mkdir -p /opt/nihao/nihaoa/nihaob
# 即使 /opt/nihao/nihaoa 不存在,也会自动逐级创建所有父目录
# 你当前路径 /opt/nihao/nihaoa/nihaob 就是用这个命令创建的

4. 创建时显示提示信息

mkdir -v newfolder
# 输出:mkdir: created directory 'newfolder'
mkdir -pv a/b/c/d
# 输出:
# mkdir: created directory 'a'
# mkdir: created directory 'a/b'
# mkdir: created directory 'a/b/c'
# mkdir: created directory 'a/b/c/d'
# (-p 和 -v 可以组合使用)

5. 创建时指定权限

mkdir -m 755 myfolder
# 创建目录并设置权限为 rwxr-xr-x
mkdir -m 700 secret
# 创建目录并设置权限为 rwx------(仅自己可读写执行)

6. 目录已存在时不报错(配合 -p)

mkdir -p existing_folder
# 如果目录已存在,不会报错,静默跳过

快速记忆表

参数 全称 含义 使用场景
-p parents 自动创建父目录 创建多级嵌套目录,最常用
-v verbose 显示详细过程 想看创建了哪些目录时用
-m mode 设置权限 创建时直接指定权限
-Z SELinux 设置安全上下文 SELinux 环境下使用

实用小技巧

# 创建当前日期命名的目录
mkdir $(date +%Y-%m-%d)
# 生成如:2026-06-24/

# 批量创建带编号的目录
mkdir folder{1..10}
# 创建 folder1 到 folder10 共 10 个目录

# 创建嵌套目录并同时创建子目录
mkdir -p project/{src,bin,docs,logs}
# 创建:
# project/
#   ├── src/
#   ├── bin/
#   ├── docs/
#   └── logs/

你贴的这个 --help 输出说明你已经在用 mkdir 了,-p 是最实用的参数,记住它就够了!😊

Attached Files

Loading attached files...
Search Results