Files
nexus/wiki/concepts/Symbolic-Link.md
2026-04-14 16:02:50 +08:00

45 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Symbolic Link"
type: concept
tags: [symbolic-link, unix, macos, filesystem]
sources: [macos-chuang-jian-yu-jie-chu-symbolic-link-openclaw-mu-lu-ying-she]
last_updated: 2026-04-14
---
## Definition
Symbolic Link符号链接是Unix/Linux系统中指向另一个文件的特殊文件类型相当于Windows的快捷方式。
## 核心特性
- 只删除链接文件,不删除真实目录
- 支持目录和文件链接
- 跨文件系统链接
- 相对路径和绝对路径支持
## macOS创建命令
```bash
# 创建符号链接
ln -s /Users/weishen/.openclaw /Users/weishen/openclaw
# 验证链接
ls -l ~ | grep openclaw
# 查看链接指向
readlink ~/openclaw
```
## 解除链接
```bash
rm ~/openclaw # 只删除链接,不删除真实目录
```
## 注意事项
- 不要误删真实目录:`rm -rf ~/.openclaw`会删除OpenClaw数据目录
- 推荐使用推荐目录结构便于Git管理和备份
## OpenClaw应用场景
将~/.openclaw隐藏目录映射到~/openclaw普通目录使Obsidian可直接访问。
## Connections
- [[OpenClaw]] ← 目录映射 ← [[Symbolic Link]]
- [[Obsidian]] ← 兼容 ← [[Symbolic Link]]