如何创建到目录的链接

时间:2021-09-07 16:23:56

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

如何创建链接xxx到/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/.

假设xxx是在/home/jake下创建的,而您目前在/home/jake中当你做cd xxx时,你直接去/home/jake/doc/test/2000/something/。

2 个解决方案

#1


326  

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

更多信息:ln的男人

#2


28  

you should use :

你应该使用:

ln -s /home/jake/doc/test/2000/something xxx

#1


326  

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

更多信息:ln的男人

#2


28  

you should use :

你应该使用:

ln -s /home/jake/doc/test/2000/something xxx