ln.1 (1435B)
- .\" utils-std: Collection of commonly available Unix tools
- .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- .\" SPDX-License-Identifier: MPL-2.0
- .Dd 2024-04-28
- .Dt LN 1
- .Os
- .Sh NAME
- .Nm ln
- .Nd create hard links and symbolic links
- .Sh SYNOPSIS
- .Nm
- .Op Fl fnv
- .Op Fl L Ns | Ns Fl P
- .Ar source...
- .Ar target
- .Nm
- .Fl s
- .Op Fl fn
- .Ar reference...
- .Ar target
- .Sh DESCRIPTION
- .Nm
- create links at
- .Ar target
- for each given
- .Ar source
- or
- .Ar reference .
- .Pp
- When
- .Ar target
- is an existing directory or multiple
- .Ar source
- or
- .Ar reference
- are given,
- .Nm
- will create links into
- .Ar target .
- .Pp
- Should be noted that unlike commands like
- .Xr cp 1 ,
- .Ar reference
- is kept as is and therefore is always relative to
- .Ar target
- rather than the current directory.
- .Sh OPTIONS
- .Bl -tag -width __
- .It Fl f
- Forcefully create links by removing existing entries.
- .It Fl L
- If
- .Ar source
- is a symbolic link, dereference it.
- .It Fl n
- Prevent descending into
- .Ar target
- as a directory if it is a symbolic link.
- .It Fl P
- If
- .Ar source
- is a symbolic link, hard link it.
- This is the default.
- .It Fl s
- Create symbolic links instead of hard links.
- .It Fl v
- Print successfully created links.
- .El
- .Sh EXIT STATUS
- .Ex -std
- .Sh STANDARDS
- .Nm
- should be compliant with the
- IEEE Std 1003.1-2024 (“POSIX.1”)
- specification.
- The
- .Fl n
- and
- .Fl v
- options are extensions.
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me