2014-02-17 16:59:07 +00:00
|
|
|
# ln
|
|
|
|
|
2024-04-18 05:04:00 +01:00
|
|
|
> Create links to files and directories.
|
2021-04-01 16:54:26 +01:00
|
|
|
> More information: <https://www.gnu.org/software/coreutils/ln>.
|
2014-02-17 16:59:07 +00:00
|
|
|
|
2019-02-08 00:31:19 +00:00
|
|
|
- Create a symbolic link to a file or directory:
|
2014-02-17 16:59:07 +00:00
|
|
|
|
2021-06-02 22:55:26 +01:00
|
|
|
`ln -s {{/path/to/file_or_directory}} {{path/to/symlink}}`
|
2014-02-17 16:59:07 +00:00
|
|
|
|
2020-10-28 13:28:52 +00:00
|
|
|
- Overwrite an existing symbolic link to point to a different file:
|
2015-03-15 11:40:20 +00:00
|
|
|
|
2021-06-02 22:55:26 +01:00
|
|
|
`ln -sf {{/path/to/new_file}} {{path/to/symlink}}`
|
2015-03-15 11:40:20 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Create a hard link to a file:
|
2014-02-17 16:59:07 +00:00
|
|
|
|
2021-06-02 22:55:26 +01:00
|
|
|
`ln {{/path/to/file}} {{path/to/hardlink}}`
|