![](/img/trans.png)
[英]How would you create a hard link (Linux) from within an application without passing arguments to the ln utility directly?
[英]How to use “ln” create link for directories on linux?
我嘗試了Linux命令行“ ln”,似乎無法做到這一點:
mkdir -p test1/test2/test3
ln -s test4 test1 #I wish to create test4 as symbolic link to test1
find test4
結果很奇怪:
$ls test1
test2 test4
好吧,test4是test1的子目錄,而不是test4的鏈接。
它沒有達到我的預期。 我應該如何實現呢? 非常感謝。
您可以更改參數ln [-fiqRrv] old new
。 第一個位置是原始文件/文件夾,第二個位置是符號鏈接。 嘗試此操作,這將在test4
創建到test1
的符號鏈接
ln -s test1 test4
更多內容: ln文檔
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.