1hardlink(1) General Commands Manual hardlink(1)
2
3
4
6 hardlink - Consolidate duplicate files via hardlinks
7
9 hardlink [-c] [-n] [-v] [-vv] [-h] directory1 [ directory2 ... ]
10
12 This manual page documents hardlink, a program which consolidates
13 duplicate files in one or more directories using hardlinks.
14
15 hardlink traverses one or more directories searching for duplicate
16 files. When it finds duplicate files, it uses one of them as the mas‐
17 ter. It then removes all other duplicates and places a hardlink for
18 each one pointing to the master file. This allows for conservation of
19 disk space where multiple directories on a single filesystem contain
20 many duplicate files.
21
22 Since hard links can only span a single filesystem, hardlink is only
23 useful when all directories specified are on the same filesystem.
24
26 -c Compare only the contents of the files being considered for
27 consolidation. Disregards permission, ownership and other
28 differences.
29
30 -f Force hardlinking across file systems.
31
32 -n Do not perform the consolidation; only print what would be
33 changed.
34
35 -v Print summary after hardlinking.
36
37 -vv Print every hardlinked file and bytes saved. Also print sum‐
38 mary after hardlinking.
39
40 -h Show help.
41
43 hardlink was written by Jakub Jelinek <jakub@redhat.com>.
44
45 Man page written by Brian Long.
46
47 Man page updated by Jindrich Novy <jnovy@redhat.com>
48
50 hardlink assumes that its target directory trees do not change from
51 under it. If a directory tree does change, this may result in hardlink
52 accessing files and/or directories outside of the intended directory
53 tree. Thus, you must avoid running hardlink on potentially changing
54 directory trees, and especially on directory trees under control of
55 another user.
56
57
58
59 hardlink(1)