linux - 如何将目录 A 链接到/var/www/root,如下所示?

标签 linux bash

alt text

如何做到这一点?

更新

我错误地执行了ln -s A/var/www/root,如何撤消它?

最佳答案

您需要使用 ln命令创建链接。默认情况下,这样的链接是硬链接(hard link)。由于您无法创建指向目录的硬链接(hard link),因此您需要使用 -s 选项创建符号链接(symbolic link)。

ln -s /var/www/root A

关于linux - 如何将目录 A 链接到/var/www/root,如下所示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4483483/

相关文章:

linux - 在 CircleCI 命令中设置环境变量

bash - 为什么 influxdb 无法启动?

regex - 使用 sed 替换列字段分隔符

Linux "file"命令的 Python 模拟

c - BCM2835 已安装但提供 undefined reference

c++ - Hex 到 Int 的转换在不同的环境中表现不同

regex - 通配符和正则表达式

linux - 将目录与根目录同步(配置)

c++ - CPP - 将源代码从 Windows 转换为 Linux

C linux正则表达式性能问题