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

more less

Linux 中的 moreless 命令详解

moreless 都是用于分页查看文件内容的命令,特别适合查看大文件。它们是 cat 的替代方案,可以一页一页地显示内容,避免屏幕快速滚动。


一、more 命令

基本概念

more 是最早的分页查看器,功能相对简单,只能向前翻页(向下浏览)。

基本用法

more [选项] 文件名

常用选项

选项 说明
-数字 指定每页显示的行数
-d 显示提示信息("Press space to continue, 'q' to quit")
-f 强制显示,不换行
-p 不滚动,清屏后显示内容
-s 压缩多个空行为一行

交互式操作键

按键 功能
空格键 / f 向下翻一页
回车键 向下翻一行
b 向后翻一页(向上)(仅限文件已完全读取时)
= 显示当前行号
/字符串 向下搜索字符串
n 查找下一个匹配项
q 退出
v 调用 vi 编辑器

常用案例

1. 查看文件

more /var/log/syslog

2. 指定每页显示 10 行

more -10 long.txt

3. 显示友好提示

more -d /etc/passwd

4. 压缩空行

more -s file.txt

5. 从特定行开始查看

# 通过管道配合
cat -n file.txt | more +100   # 从第100行开始

6. 与其他命令配合

ls -la | more          # 分页显示目录列表
grep "error" log.txt | more   # 分页显示搜索结果

二、less 命令

基本概念

lessmore 的增强版,功能更强大,可以向前和向后翻页。名称来源于 "less is more" 的反讽。

基本用法

less [选项] 文件名

常用选项

选项 说明
-N / --LINE-NUMBERS 显示行号
-S 不换行(水平滚动)
-g 不高亮显示搜索结果
-i 搜索时忽略大小写
-M 显示更详细的提示信息(文件位置百分比)
-R 显示 ANSI 颜色转义码(彩色输出)
-F 若文件内容少于一个屏幕,直接显示(类似 cat)
+/模式 从匹配模式的行开始显示
+行号 从指定行号开始显示

交互式操作键

按键 功能
空格键 / f / PageDown 向下翻一页
b / PageUp 向上翻一页
回车键 / 向下翻一行
y / 向上翻一行
g 跳转到文件开头
G 跳转到文件末尾
数字 + g 跳转到指定行(如 100g
/字符串 向下搜索
?字符串 向上搜索
n 查找下一个匹配项
N 查找上一个匹配项
= 显示当前文件信息(文件名、行号、百分比)
v 调用 vi/vim 编辑器
h 显示帮助
q 退出

常用案例

1. 查看文件

less /var/log/syslog

2. 显示行号

less -N file.txt

3. 不换行显示(适合查看表格数据)

less -S data.csv
# 按 ← → 键水平滚动

4. 从特定行开始查看

less +100 file.txt      # 从第100行开始
less +/error log.txt    # 从第一个包含 "error" 的行开始

5. 显示详细信息

less -M file.txt
# 显示:file.txt lines 1-46/100 (1%) 

6. 忽略大小写搜索

less -i file.txt
# 然后按 / 搜索,忽略大小写

7. 查看彩色日志

less -R colored.log
# 保留彩色输出

8. 与其他命令配合

dmesg | less -N        # 查看内核日志并显示行号
ps aux | less           # 分页显示进程列表
history | less          # 分页显示命令历史

三、more vs less 对比

功能 more less
向前翻页 ✅ (b键)
向后翻页
搜索 ✅ (仅向下) ✅ (向下/向上)
行号显示 ✅ (-N)
水平滚动 ✅ (-S)
跳转到指定行 ✅ (100g)
实时读取 ✅ (监控日志文件)
显示百分比 ✅ (-M)
功能丰富度 ⭐⭐ ⭐⭐⭐⭐⭐
启动速度 稍慢(但功能更多)
内存占用 稍大

四、实际场景选择

何时使用 more

何时使用 less(推荐)


五、高级技巧

1. less 实时监控日志(类似 tail -f

less +F /var/log/syslog
# 按 Ctrl+C 退出实时监控模式,按 F 重新进入

2. less 查看多个文件

less file1.txt file2.txt
# 在 less 中:
# :n 切换到下一个文件
# :p 切换到上一个文件
# :e 文件名 打开新文件

3. 标记位置

# 在 less 中按 m 然后按任意字母(如 a)标记当前位置
# 按 ' 然后按 a 回到标记位置

4. 过滤查看(通过管道)

# 只查看包含 "error" 的行
cat log.txt | grep error | less

5. 查看压缩文件

# 配合 zcat
zcat file.gz | less

6. 用 less 作为默认分页器

# 设置环境变量
export PAGER=less
# 这样 man、git 等命令默认使用 less

六、快速参考表

需求 more 命令 less 命令
查看普通文件 more file less file
显示行号 less -N file
跳转到末尾 less +G file 或按 G
搜索关键字 /keyword /keyword(向下) ?keyword(向上)
实时监控 less +F file
翻页 空格f 空格fPageDown
退出 q q

七、总结

推荐:日常使用 less 作为主要的分页查看器,因为功能更强大、更灵活。

示例组合

# 查看系统日志(带行号、实时监控)
less -N +F /var/log/syslog

# 查看配置文件(带行号)
less -N /etc/nginx/nginx.conf

# 查看长输出
history | less -N
dmesg | less -M

Attached Files

Loading attached files...
Search Results