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

linux写入文本速查

我为你整理了一个Linux写入文本速查表,你可以直接保存为文件或打印出来,随时快速查看。

在需要 root 权限的目录写文件,非root用户权限不足使用下面方法


📄 一、速查命令表

需求 命令 备注
快速写一句 echo "内容" > file > 覆盖,>> 追加
写多行内容 cat > file << 'EOF' ... EOF 最清晰
显示并保存 `echo "内容" tee file`
追加内容 echo "新内容" >> file 不覆盖原来内容
需要权限写入 `echo "内容" sudo tee file`
需要权限追加 `echo "内容" sudo tee -a file`
编辑已有文件 nano filevim file 交互式编辑
清空文件 > fileecho -n > file 保留空文件

📄 二、最常用示例

# 1. 写一行内容
echo "Hello World" > test.txt

# 2. 追加一行
echo "New Line" >> test.txt

# 3. 写多行(推荐方式)
cat > test.txt << 'EOF'
第一行
第二行
第三行
EOF

# 4. 追加多行
cat >> test.txt << 'EOF'
追加的第一行
追加的第二行
EOF

# 5. 查看结果
cat test.txt

📄 三、需要 root 权限时

# 方式1: 使用 tee(推荐)
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf

# 方式2: 追加
echo "新配置" | sudo tee -a /etc/hosts

# 方式3: 使用  -c
sudo  -c 'echo "配置内容" > /etc/config.conf'

# 方式4: 多行写入
sudo tee /etc/my.conf << 'EOF'
配置内容
多行也OK
EOF

📄 四、对比说明

操作符 作用 例子
> 覆盖写入(从头写) echo "a" > file
>> 追加写入(末尾加) echo "b" >> file
` ` 管道传给 tee
<< 多行输入(HERE文档) cat > file << 'EOF'

📄 五、三大常用方式速记

# ❶ echo:最简单,写单行
echo "内容" > file

# ❷ cat + EOF:写多行最清晰
cat > file << 'EOF'
内容
EOF

# ❸ sudo + tee:需要权限时
echo "内容" | sudo tee file

📄 六、推荐别名(加到 ~/.rc)

# 快捷写入
alias w='echo >'
alias wa='echo >>'
alias v='nano'
alias c='clear'

# 使用
w "hello" test.txt     # 写入
wa "world" test.txt    # 追加
v test.txt             # 编辑

📄 七、日常场景一句话

# 创建脚本
echo "#!/bin/" > myscript.sh
echo "echo Hello" >> myscript.sh
chmod +x myscript.sh

# 修改hosts
echo "127.0.0.1 myhost" | sudo tee -a /etc/hosts

# 记录日志
echo "[$(date)] 操作完成" >> app.log

# 批量追加
for f in *.txt; do echo "---" >> "$f"; done

Attached Files

Loading attached files...
Search Results