File: hardlink.1

package info (click to toggle)
hardlink 0.3.2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 84 kB
  • sloc: ansic: 821; sh: 69; makefile: 42
file content (88 lines) | stat: -rw-r--r-- 3,187 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
.\" Copyright (C) 2008 - 2012 Julian Andres Klode. See hardlink.c for license.
.\" SPDX-License-Identifier: MIT
.TH hardlink 1 "2012-09-17" "0.3"
.SH NAME
hardlink \- Link multiple copies of a file
.SH SYNOPSIS
.B hardlink
.RI [ option ]...
.RI [ directory | file ]...
.SH DESCRIPTION
.B hardlink
is a tool which replaces copies of a file with hardlinks, therefore saving
space.
.SH OPTIONS
.TP
.B \-h or \-\-help
print quick usage details to the screen.
.TP
.B \-v or \-\-verbose
More verbose output. If specified once, every hardlinked file is displayed,
if specified twice, it also shows every comparison.
.TP
.B \-n or \-\-dry\-run
Do not act, just print what would happen
.TP
.B \-f or \-\-respect\-name
Only try to link files with the same (basename).
.TP
.B \-p or \-\-ignore\-mode
Link/compare files even if their mode is different. This may be a bit unpredictable.
.TP
.B \-o or \-\-ignore\-owner
Link/compare files even if their owner (user and group) is different. It is not
predictable
.TP
.B \-t or \-\-ignore\-time
Link/compare files even if their time of modification is different. You almost
always want this.
.TP
.B \-X or \-\-respect\-xattrs
Only try to link files with the same extended attributes.
.TP
.B \-m or \-\-maximize
Among equal files, keep the file with the highest link count.
.TP
.B \-M or \-\-minimize
Among equal files, keep the file with the lowest link count.
.TP
.B \-O or \-\-keep\-oldest
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.
.TP
.B \-x or \-\-exclude
A regular expression which excludes files from being compared and linked.
.TP
.B \-i or \-\-include
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.
.TP
.B \-s or \-\-minimum\-size
The minimum size to consider. By default this is 1, so empty files will not
be linked. An optional suffix of K,M,G,T may be provided, indicating that the
file size is KiB,MiB,GiB,TiB.

.SH ARGUMENTS
.B hardlink
takes one or more directories which will be searched for files to be linked.

.SH BUGS
.B 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.

.B hardlink
, as of version 0.3 RC1, improperly calculates the amount of space saved if the
option \-\-respect\-name is specified. In previous versions, the amount was
wrong in almost all other cases as well.

.SH AUTHOR
The program hardlink and this manpage have been written by Julian Andres Klode,
and are licensed under the MIT license. See the code of hardlink for further
information.