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