print quick usage details to the screen.
More verbose output. If specified once, every hardlinked file
is displayed, if specified twice, it also shows every
Quiet mode, don’t print anything.
Do not act, just print what would happen.
Only try to link files with the same (basename). It’s
strongly recommended to use long options rather than -f which
is interpreted in a different way by others hardlink
Link/compare files even if their mode is different. This may
be a bit unpredictable.
Link/compare files even if their owner (user and group) is
different. It is not predictable.
Link/compare files even if their time of modification is
different. You almost always want this.
Only try to link files with the same extended attributes.
Among equal files, keep the file with the highest link count.
Among equal files, keep the file with the lowest link count.
Among equal files, keep the oldest file (least recent
modification time). By default, the newest file is kept. If
--maximize or --minimize is specified, the link count has a
higher precedence than the time of modification.
-x, --exclude regex
A regular expression which excludes files from being compared
-i, --include regex
A regular expression to include files. If the option
--exclude has been given, this option re-includes files which
would otherwise be excluded. If the option is used without
--exclude, only files matched by the pattern are included.
-s, --minimum-size size
The minimum size to consider. By default this is 1, so empty
files will not be linked. The size argument may be followed
by the multiplicative suffixes KiB (=1024), MiB (=1024*1024),
and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is
optional, e.g., "K" has the same meaning as "KiB").
The original hardlink implementation uses the option -f to force
hardlinks creation between filesystem. This very rarely usable
feature is no more supported by the current hardlink.
hardlink assumes that the trees it operates on do not change
during operation. If a tree does change, the result is undefined
and potentially dangerous. For example, if a regular file is
replaced by a device, hardlink may start reading from the device.
If a component of a path is replaced by a symbolic link or file
permissions change, security may be compromised. Do not run
hardlink on a changing tree or on a tree controlled by another
There are multiple hardlink implementations. The very first
implementation is from Jakub Jelinek for Fedora distribution,
this implementation has been used in util-linux between versions
v2.34 to v2.36. The current implementations is based on Debian
version from Julian Andres Klode.
The hardlink command is part of the util-linux package which can
be downloaded from Linux Kernel Archive
<https://www.kernel.org/pub/linux/utils/util-linux/>. This page
is part of the util-linux (a random collection of Linux
utilities) project. Information about the project can be found at
⟨https://www.kernel.org/pub/linux/utils/util-linux/⟩. If you have
a bug report for this manual page, send it to
email@example.com. This page was obtained from the
project's upstream Git repository
2021-06-20. (At that time, the date of the most recent commit
that was found in the repository was 2021-06-18.) If you discover
any rendering problems in this HTML version of the page, or you
believe there is a better or more up-to-date source for the page,
or you have corrections or improvements to the information in
this COLOPHON (which is not part of the original manual page),
send a mail to firstname.lastname@example.org
util-linux 2.37.85-637cc 2021-04-02 HARDLINK(1)