本文介绍了如何创建到目录的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建链接 xxx / home / jake / doc / test / 2000 / something /



假设 xxx 是在 / home / jake 您目前位于 / home / jake 。当你执行 cd xxx 时,你直接进入 / home / jake / doc / test / 2000 / something /

解决方案

符号链接或软链接(文件或目录,更灵活和自我记录)

 #源链接
ln -s / home / jake / doc / test / 2000 / something / home / jake / xxx

硬链接(仅文件,不太灵活,不能自我记录)

 #源链接
ln / home / jake / doc / test / 2000 / something / home / jake / xxx

详情:


How to create a link xxx to /home/jake/doc/test/2000/something/?

Assume the xxx is created under /home/jake and you're currently in /home/jake. When you do cd xxx, you directly go to /home/jake/doc/test/2000/something/.

解决方案

Symbolic or soft link (files or directories, more flexible and self documenting)

#     Source                             Link
ln -s /home/jake/doc/test/2000/something /home/jake/xxx

Hard link (files only, less flexible and not self documenting)

#   Source                             Link
ln /home/jake/doc/test/2000/something /home/jake/xxx

More information: man ln

这篇关于如何创建到目录的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 15:23