table of contents
- testing 2.39.3-6
- unstable 2.39.3-11
- experimental 2.40-4
HARDLINK(1) | Dienstprogramme für Benutzer | HARDLINK(1) |
BEZEICHNUNG¶
hardlink - mehrere Kopien einer Datei verlinken
ÜBERSICHT¶
hardlink [options] [directory|file]...
BESCHREIBUNG¶
hardlink is a tool that replaces copies of a file with either hardlinks or copy-on-write clones, thus saving space.
hardlink first creates a binary tree of file sizes and then compares the content of files that have the same size. There are two basic content comparison methods. The memcmp method directly reads data blocks from files and compares them. The other method is based on checksums (like SHA256); in this case for each data block a checksum is calculated by the Linux kernel crypto API, and this checksum is stored in userspace and used for file comparisons.
Für jede Datei wird auch ein »intro«-Puffer (32 bytes) zwischengespeichert. Dieser Puffer wird unabhängig von der Vergleichsmethode und angeforderten »cache-size« und »io-size« verwendet. Der »intro«-Puffer reduziert Operationen mit Dateninhalten erheblich, da Dateien am Anfang oft sehr unterschiedlich sind.
OPTIONEN¶
-h, --help
-V, --version
-c, --content
-b, --io-size Größe
-d, --respect-dir
-f, --respect-name
-i, --include regulärer-Ausdruck
-m, --maximize
-M, --minimize
-n, --dry-run
-o, --ignore-owner
-O, --keep-oldest
-p, --ignore-mode
-q, --quiet
-r, --cache-size Größe
-s, --minimum-size Größe
-S, --maximum-size Größe
-t, --ignore-time
-v, --verbose
-x, --exclude regulärer-Ausdruck
-X, --respect-xattrs
-y, --method Name
--reflink[=wann]
Das optionale Argument wann kann never, always oder auto sein. Falls das Argument wann weggelassen wird, ist auto die Voreinstellung. In diesem Fall prüft hardlink den Dateisystemtyp und verwendet Reflinks nur auf BTRFS und XFS und fällt auf harte Links zurück, wenn die Erstellung von Reflinks unmöglich ist. Das Argument always deaktiviert die Erkennung des Dateisystemtyps und das Ausweichen auf harte Links, wobei in diesem Fall nur Reflinks erlaubt sind.
--skip-reflinks
ARGUMENTE¶
hardlink takes one or more directories which will be searched for files to be linked.
FEHLER¶
Die ursprüngliche hardlink-Implementierung verwendet die Option -f, um die Erzeugung harter Links über Dateisystemgrenzen hinweg zu erzwingen. Diese kaum sinnvoll nutzbare Funktion wird vom aktuellen hardlink nicht mehr unterstützt.
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.
AUTOR¶
Es gibt mehrere hardlink-Implementierungen. Die allererste Implementierung stammt von Jakub Jelinek für die Fedora-Distribution; diese Implementierung wurde in Util-linux von den Versionen 2.34 bis 2.36 genutzt. Die gegenwärtige Implementierung basiert auf der Debian-Version von Julian Andres Klode.
FEHLER MELDEN¶
Nutzen Sie zum Melden von Fehlern das Fehlererfassungssystem auf <https://github.com/util-linux/util-linux/issues>.
VERFÜGBARKEIT¶
Der Befehl hardlink ist Teil des Pakets util-linux, welches aus dem Linux-Kernel-Archiv <https://www.kernel.org/pub/linux/utils/util-linux/> heruntergeladen werden kann.
2024-04-03 | util-linux 2.40 |