1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-18 19:55:45 +02:00
tldr/pages.zh/common/ln.md

17 lines
507 B
Markdown
Raw Normal View History

2022-06-24 13:48:56 +02:00
# ln
> 创建指向文件和目录的链接。
> 更多信息:<https://www.gnu.org/software/coreutils/manual/html_node/ln-invocation.html>.
2022-06-24 13:48:56 +02:00
- 创建指向文件或目录的符号链接:
`ln {{[-s|--symbolic]}} {{/路径/到/文件或目录}} {{路径/到/符号链接}}`
2022-06-24 13:48:56 +02:00
- 覆盖现有的符号链接以指向其他文件:
`ln {{[-sf|--symbolic --force]}} {{/路径/到/新文件}} {{路径/到/符号链接}}`
2022-06-24 13:48:56 +02:00
- 创建文件的硬链接:
`ln {{/路径/到/文件}} {{路径/到/硬链接}}`