table of contents
HARDLINK(1) | User Commands | HARDLINK(1) |
NAME¶
hardlink - link multiple copies of a file
SYNOPSIS¶
hardlink [options] [directory|file]...
DESCRIPTION¶
hardlink is a tool which replaces copies of a file with hardlinks, therefore saving space.
OPTIONS¶
-h, --help
-v, --verbose
-q, --quiet
-n, --dry-run
-f, --respect-name
-p, --ignore-mode
-o, --ignore-owner
-t, --ignore-time
-X, --respect-xattrs
-m, --maximize
-M, --minimize
-O, --keep-oldest
-x, --exclude regex
-i, --include regex
-s, --minimum-size size
ARGUMENTS¶
hardlink takes one or more directories which will be searched for files to be linked.
BUGS¶
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 user.
AUTHOR¶
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.
REPORTING BUGS¶
For bug reports, use the issue tracker at <https://github.com/karelzak/util-linux/issues>.
AVAILABILITY¶
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/>.
2022-02-14 | util-linux 2.37.4 |