summaryrefslogtreecommitdiff
path: root/dupfiles.1
blob: ef0eaa81a6e7c3d7f0f50ba5913306e895003eed (plain)
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
.\" Copyright 2010 Lars Wirzenius <liw@liw.fi>
.\" 
.\" This program is free software: you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation, either version 3 of the License, or
.\" (at your option) any later version.
.\" 
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\" 
.\" You should have received a copy of the GNU General Public License
.\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
.\"
.TH DUPFILES 1
.SH NAME
dupfiles \- find identical files and optionally hardlink them
.SH SYNOPSIS
.B dupfiles
.RB [ --make-hardlinks ]
.RB [ --progress ]
.RB [ --remove ]
.RI [ file ]...
.SH DESCRIPTION
.B dupfiles
finds files that have identical content.
It writes out the names of the files,
grouped together,
with groups separated by empty lines.
If you give it directory names on the command line,
it will automatically recurse into them to find files.
.PP
It can optionally hardlink the files so that they use less disk space.
Note that after hardlinking, the files are the same file:
if you modify one, both names show the modified file.
Thus, if you the files should not be the same file, but just copies of
each other, do not hardlink them together.
.PP
Files must have same owner, same group, and same permissions bits
to be hardlinked together.
.SH OPTIONS
.TP
.BR --progress
Report progress while program is running.
.TP
.BR --make-hardlinks
Instead of reporting files that have been found,
make sure all names point at the same content.
.TP
.BR --remove
Remove all but one copy of identical files.
The copy that gets kept is chosen arbitrarily.
.SH EXAMPLE
To find all duplicate packages in Debian and Ubuntu:
.IP
dupfiles /mirrors/debian /mirrors/ubuntu
.SH "SEE ALSO"
.BR fdupes (1).