Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
538 views
in Technique[技术] by (71.8m points)

linux - 如何在Linux中符号链接文件? [关闭](How can I symlink a file in Linux? [closed])

I want to make a symbolic link in Linux.

(我想在Linux中建立一个符号链接。)

I have written this Bash command where the first path is the folder I want link into and the second path is the compiled source.

(我已经编写了此Bash命令,其中第一个路径是我要链接到的文件夹,第二个路径是已编译的源代码。)

ln -s '+basebuild+'/IpDome-kernel/kernel /home/build/sandbox/gen2/basebuild/IpDome-kernel/kernal 

Is this correct?

(这个对吗?)

  ask by chrissygormley translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

To create a new symlink (will fail if symlink exists already):

(要创建新的符号链接(如果符号链接已存在,将失败):)

ln -s /path/to/file /path/to/symlink

To create or update a symlink:

(要创建或更新符号链接:)

ln -sf /path/to/file /path/to/symlink

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...